Package org.apache.iceberg.io
Class ImmutableStorageCredential
java.lang.Object
org.apache.iceberg.io.ImmutableStorageCredential
- All Implemented Interfaces:
Serializable,StorageCredential
@ParametersAreNonnullByDefault
@Immutable
@CheckReturnValue
public final class ImmutableStorageCredential
extends Object
implements StorageCredential
This was copied from the generated Immutable implementation of
StorageCredential with the
one difference that the underlying Map is not unmodifiable but rather a SerializableMap
so that Ser/De properly works with Kryo.
Use the builder to create immutable instances: ImmutableStorageCredential.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableStorageCredential. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableStorageCredential.config()static ImmutableStorageCredentialcopyOf(StorageCredential instance) Creates an immutable copy of aStorageCredentialvalue.booleanThis instance is equal to all instances ofImmutableStorageCredentialthat have equal attribute values.inthashCode()Computes a hash code from attributes:prefix,config.prefix()toString()Prints the immutable valueStorageCredentialwith attribute values.withConfig(Map<String, ? extends String> entries) Copy the current immutable object by replacing theconfigmap with the specified map.withPrefix(String value) Copy the current immutable object by setting a value for theprefixattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.iceberg.io.StorageCredential
validate
-
Method Details
-
prefix
- Specified by:
prefixin interfaceStorageCredential- Returns:
- The value of the
prefixattribute
-
config
- Specified by:
configin interfaceStorageCredential- Returns:
- The value of the
configattribute
-
withPrefix
Copy the current immutable object by setting a value for theprefixattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for prefix- Returns:
- A modified copy of the
thisobject
-
withConfig
Copy the current immutable object by replacing theconfigmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the config map- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableStorageCredentialthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:prefix,config. -
toString
Prints the immutable valueStorageCredentialwith attribute values. -
copyOf
Creates an immutable copy of aStorageCredentialvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable StorageCredential instance
-
builder
Creates a builder forImmutableStorageCredential.ImmutableStorageCredential.builder() .prefix(String) // requiredprefix.putConfig|putAllConfig(String => String) //configmappings .build();- Returns:
- A new ImmutableStorageCredential builder
-