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 class
Builds instances of typeImmutableStorageCredential
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableStorageCredential
.config()
static ImmutableStorageCredential
copyOf
(StorageCredential instance) Creates an immutable copy of aStorageCredential
value.boolean
This instance is equal to all instances ofImmutableStorageCredential
that have equal attribute values.int
hashCode()
Computes a hash code from attributes:prefix
,config
.prefix()
toString()
Prints the immutable valueStorageCredential
with attribute values.withConfig
(Map<String, ? extends String> entries) Copy the current immutable object by replacing theconfig
map with the specified map.withPrefix
(String value) Copy the current immutable object by setting a value for theprefix
attribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.iceberg.io.StorageCredential
validate
-
Method Details
-
prefix
- Specified by:
prefix
in interfaceStorageCredential
- Returns:
- The value of the
prefix
attribute
-
config
- Specified by:
config
in interfaceStorageCredential
- Returns:
- The value of the
config
attribute
-
withPrefix
Copy the current immutable object by setting a value for theprefix
attribute. 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
this
object
-
withConfig
Copy the current immutable object by replacing theconfig
map 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
this
object
-
equals
This instance is equal to all instances ofImmutableStorageCredential
that have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:prefix
,config
. -
toString
Prints the immutable valueStorageCredential
with attribute values. -
copyOf
Creates an immutable copy of aStorageCredential
value. 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) // required
prefix
.putConfig|putAllConfig(String => String) //config
mappings .build();- Returns:
- A new ImmutableStorageCredential builder
-