Package org.projectnessie.gc.base
Class ImmutableGCParams.Builder
- java.lang.Object
-
- org.projectnessie.gc.base.ImmutableGCParams.Builder
-
- Enclosing class:
- ImmutableGCParams
@NotThreadSafe public static final class ImmutableGCParams.Builder extends Object
Builds instances of typeImmutableGCParams. Initialize attributes and then invoke thebuild()method to create an immutable instance.Builderis not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.
-
-
Method Summary
-
-
-
Method Detail
-
from
public final ImmutableGCParams.Builder from(GCParams instance)
Fill a builder with attribute values from the providedGCParamsinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
putNessieClientConfigs
public final ImmutableGCParams.Builder putNessieClientConfigs(String key, String value)
Put one entry to thenessieClientConfigsmap.- Parameters:
key- The key in the nessieClientConfigs mapvalue- The associated value in the nessieClientConfigs map- Returns:
thisbuilder for use in a chained invocation
-
putNessieClientConfigs
public final ImmutableGCParams.Builder putNessieClientConfigs(Map.Entry<String,? extends String> entry)
Put one entry to thenessieClientConfigsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
nessieClientConfigs
public final ImmutableGCParams.Builder nessieClientConfigs(Map<String,? extends String> entries)
Sets or replaces all mappings from the specified map as entries for thenessieClientConfigsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the nessieClientConfigs map- Returns:
thisbuilder for use in a chained invocation
-
putAllNessieClientConfigs
public final ImmutableGCParams.Builder putAllNessieClientConfigs(Map<String,? extends String> entries)
Put all mappings from the specified map as entries tonessieClientConfigsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the nessieClientConfigs map- Returns:
thisbuilder for use in a chained invocation
-
putCutOffTimestampPerRef
public final ImmutableGCParams.Builder putCutOffTimestampPerRef(String key, Instant value)
Put one entry to thecutOffTimestampPerRefmap.- Parameters:
key- The key in the cutOffTimestampPerRef mapvalue- The associated value in the cutOffTimestampPerRef map- Returns:
thisbuilder for use in a chained invocation
-
putCutOffTimestampPerRef
public final ImmutableGCParams.Builder putCutOffTimestampPerRef(Map.Entry<String,? extends Instant> entry)
Put one entry to thecutOffTimestampPerRefmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
cutOffTimestampPerRef
public final ImmutableGCParams.Builder cutOffTimestampPerRef(@Nullable Map<String,? extends Instant> entries)
Sets or replaces all mappings from the specified map as entries for thecutOffTimestampPerRefmap. Nulls are not permitted as keys or values, but parameter itself can be null- Parameters:
entries- The entries that will be added to the cutOffTimestampPerRef map- Returns:
thisbuilder for use in a chained invocation
-
putAllCutOffTimestampPerRef
public final ImmutableGCParams.Builder putAllCutOffTimestampPerRef(Map<String,? extends Instant> entries)
Put all mappings from the specified map as entries tocutOffTimestampPerRefmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the cutOffTimestampPerRef map- Returns:
thisbuilder for use in a chained invocation
-
defaultCutOffTimestamp
public final ImmutableGCParams.Builder defaultCutOffTimestamp(Instant defaultCutOffTimestamp)
Initializes the value for thedefaultCutOffTimestampattribute.- Parameters:
defaultCutOffTimestamp- The value for defaultCutOffTimestamp- Returns:
thisbuilder for use in a chained invocation
-
deadReferenceCutOffTimeStamp
public final ImmutableGCParams.Builder deadReferenceCutOffTimeStamp(@Nullable Instant deadReferenceCutOffTimeStamp)
Initializes the value for thedeadReferenceCutOffTimeStampattribute.- Parameters:
deadReferenceCutOffTimeStamp- The value for deadReferenceCutOffTimeStamp (can benull)- Returns:
thisbuilder for use in a chained invocation
-
sparkPartitionsCount
public final ImmutableGCParams.Builder sparkPartitionsCount(@Nullable Integer sparkPartitionsCount)
Initializes the value for thesparkPartitionsCountattribute.- Parameters:
sparkPartitionsCount- The value for sparkPartitionsCount (can benull)- Returns:
thisbuilder for use in a chained invocation
-
commitProtectionDuration
public final ImmutableGCParams.Builder commitProtectionDuration(Duration commitProtectionDuration)
Initializes the value for thecommitProtectionDurationattribute.If not set, this attribute will have a default value as returned by the initializer of
commitProtectionDuration.- Parameters:
commitProtectionDuration- The value for commitProtectionDuration- Returns:
thisbuilder for use in a chained invocation
-
bloomFilterExpectedEntries
public final ImmutableGCParams.Builder bloomFilterExpectedEntries(@Nullable Long bloomFilterExpectedEntries)
Initializes the value for thebloomFilterExpectedEntriesattribute.- Parameters:
bloomFilterExpectedEntries- The value for bloomFilterExpectedEntries (can benull)- Returns:
thisbuilder for use in a chained invocation
-
bloomFilterFpp
public final ImmutableGCParams.Builder bloomFilterFpp(double bloomFilterFpp)
Initializes the value for thebloomFilterFppattribute.If not set, this attribute will have a default value as returned by the initializer of
bloomFilterFpp.- Parameters:
bloomFilterFpp- The value for bloomFilterFpp- Returns:
thisbuilder for use in a chained invocation
-
build
public ImmutableGCParams build()
Builds a newImmutableGCParams.- Returns:
- An immutable instance of GCParams
- Throws:
IllegalStateException- if any required attributes are missing
-
-