Interface DatabaseAdapterConfig
-
- All Known Subinterfaces:
AdjustableDatabaseAdapterConfig
public interface DatabaseAdapterConfigBase database-adapter configuration type.DatabaseAdapterimplementations that need more configuration options must extend this interface, have theValue.Immutableannotation and declare thewith...methods implemented by "immutables".
-
-
Field Summary
Fields Modifier and Type Field Description static longDEFAULT_ASSUMED_WALL_CLOCK_DRIFT_MICROSstatic intDEFAULT_COMMIT_RETRIESstatic intDEFAULT_COMMIT_TIMEOUTstatic intDEFAULT_KEY_LIST_DISTANCEstatic intDEFAULT_KEY_LIST_ENTITY_PREFETCHstatic floatDEFAULT_KEY_LIST_HASH_LOAD_FACTORstatic intDEFAULT_MAX_ENTITY_SIZEstatic intDEFAULT_MAX_KEY_LIST_ENTITY_SIZEstatic booleanDEFAULT_NAMESPACE_VALIDATIONstatic intDEFAULT_PARENTS_PER_COMMITstatic intDEFAULT_PARENTS_PER_REFLOG_ENTRYstatic java.lang.StringDEFAULT_REPOSITORY_IDstatic intDEFAULT_RETRY_INITIAL_SLEEP_MILLIS_LOWERstatic intDEFAULT_RETRY_INITIAL_SLEEP_MILLIS_UPPERstatic intDEFAULT_RETRY_MAX_SLEEP_MILLIS
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default longcurrentTimeInMicros()Returns the current time in microseconds since epoch.default longgetAssumedWallClockDriftMicros()The assumed wall-clock drift between multiple Nessie instances in microseconds.default java.time.ClockgetClock()TheClockto use.default intgetCommitRetries()Maximum retries for CAS-like operations.default longgetCommitTimeout()Timeout for CAS-like operations in milliseconds.default intgetKeyListDistance()default intgetKeyListEntityPrefetch()The number of adjacent key-list-entities to fetch, defaults to 0.default floatgetKeyListHashLoadFactor()Configures key-list hash-table load-factor for the open-addressing hash map used for key-lists.default intgetMaxKeyListEntitySize()Maximum size of a database object/row.default intgetMaxKeyListSize()Maximum size of a database object/row.default intgetParentsPerCommit()The number of parent-commit-hashes stored inCommitLogEntry.getParents().default intgetParentsPerRefLogEntry()The number of Ancestor (reflogId, commitHash) stored inRefLog#getParents().default java.lang.StringgetRepositoryId()A free-form string that identifies a particular Nessie storage repository.default longgetRetryInitialSleepMillisLower()When the database adapter has to retry an operation due to a concurrent, conflicting update to the database state, this parameter defines the initial lower bound of the sleep time.default longgetRetryInitialSleepMillisUpper()When the database adapter has to retry an operation due to a concurrent, conflicting update to the database state, this parameter defines the initial upper bound of the sleep time.default longgetRetryMaxSleepMillis()When the database adapter has to retry an operation due to a concurrent, conflicting update to the database state, this parameter defines the maximum sleep time.default booleanvalidateNamespaces()Committing operations by default enforce that all (parent) namespaces exist.
-
-
-
Field Detail
-
DEFAULT_REPOSITORY_ID
static final java.lang.String DEFAULT_REPOSITORY_ID
- See Also:
- Constant Field Values
-
DEFAULT_PARENTS_PER_COMMIT
static final int DEFAULT_PARENTS_PER_COMMIT
- See Also:
- Constant Field Values
-
DEFAULT_KEY_LIST_DISTANCE
static final int DEFAULT_KEY_LIST_DISTANCE
- See Also:
- Constant Field Values
-
DEFAULT_MAX_ENTITY_SIZE
static final int DEFAULT_MAX_ENTITY_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_MAX_KEY_LIST_ENTITY_SIZE
static final int DEFAULT_MAX_KEY_LIST_ENTITY_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_KEY_LIST_HASH_LOAD_FACTOR
static final float DEFAULT_KEY_LIST_HASH_LOAD_FACTOR
- See Also:
- Constant Field Values
-
DEFAULT_KEY_LIST_ENTITY_PREFETCH
static final int DEFAULT_KEY_LIST_ENTITY_PREFETCH
- See Also:
- Constant Field Values
-
DEFAULT_COMMIT_TIMEOUT
static final int DEFAULT_COMMIT_TIMEOUT
- See Also:
- Constant Field Values
-
DEFAULT_COMMIT_RETRIES
static final int DEFAULT_COMMIT_RETRIES
- See Also:
- Constant Field Values
-
DEFAULT_PARENTS_PER_REFLOG_ENTRY
static final int DEFAULT_PARENTS_PER_REFLOG_ENTRY
- See Also:
- Constant Field Values
-
DEFAULT_RETRY_INITIAL_SLEEP_MILLIS_LOWER
static final int DEFAULT_RETRY_INITIAL_SLEEP_MILLIS_LOWER
- See Also:
- Constant Field Values
-
DEFAULT_RETRY_INITIAL_SLEEP_MILLIS_UPPER
static final int DEFAULT_RETRY_INITIAL_SLEEP_MILLIS_UPPER
- See Also:
- Constant Field Values
-
DEFAULT_RETRY_MAX_SLEEP_MILLIS
static final int DEFAULT_RETRY_MAX_SLEEP_MILLIS
- See Also:
- Constant Field Values
-
DEFAULT_ASSUMED_WALL_CLOCK_DRIFT_MICROS
static final long DEFAULT_ASSUMED_WALL_CLOCK_DRIFT_MICROS
- See Also:
- Constant Field Values
-
DEFAULT_NAMESPACE_VALIDATION
static final boolean DEFAULT_NAMESPACE_VALIDATION
- See Also:
- Constant Field Values
-
-
Method Detail
-
validateNamespaces
@Default default boolean validateNamespaces()
Committing operations by default enforce that all (parent) namespaces exist.This configuration setting is only present for a few Nessie releases to work around potential migration issues and is subject to removal.
- Since:
- 0.52.0
-
getRepositoryId
@Default default java.lang.String getRepositoryId()
A free-form string that identifies a particular Nessie storage repository.When remote (shared) storage is used, multiple Nessie repositories may co-exist in the same database (and in the same schema). In that case this configuration parameter can be used to distinguish those repositories.
All
DatabaseAdapterimplementations must respect this parameter.
-
getParentsPerCommit
@Default default int getParentsPerCommit()
The number of parent-commit-hashes stored inCommitLogEntry.getParents(). Defaults to 20.
-
getKeyListDistance
@Default default int getKeyListDistance()
Eachn-thCommitLogEntry, wheren ==value of this parameter, will contain a "full"KeyList. Defaults to 20.
-
getMaxKeyListSize
@Default default int getMaxKeyListSize()
Maximum size of a database object/row.This parameter is respected for
KeyListin aCommitLogEntry.Not all kinds of databases have hard limits on the maximum size of a database object/row.
This value must not be "on the edge" - means: it must leave enough room for a somewhat large-ish list via
CommitLogEntry.getKeyListsIds(), database-serialization overhead and similar.Values
<=0are illegal, defaults to 250000.
-
getMaxKeyListEntitySize
@Default default int getMaxKeyListEntitySize()
Maximum size of a database object/row.This parameter is respected for
KeyListEntity.Not all kinds of databases have hard limits on the maximum size of a database object/row.
This value must not be "on the edge" - means: it must leave enough room for database-serialization overhead and similar.
Values
<=0are illegal, defaults to 1000000.
-
getKeyListHashLoadFactor
@Default default float getKeyListHashLoadFactor()
Configures key-list hash-table load-factor for the open-addressing hash map used for key-lists.Small segments and load factors above 0.65 are bad, as those would lead to many database fetches. Good configurations, that usually lead to only one additional key-list segment fetch are these:
- segment size of 128kB or more with a load factor of 0.65
- segment sizes of 64kB or more with a load factor of 0.45
-
getKeyListEntityPrefetch
@Default default int getKeyListEntityPrefetch()
The number of adjacent key-list-entities to fetch, defaults to 0.Applied to key-lists written by Nessie since 0.31.0 using the
CommitLogEntry.KeyListVariant.OPEN_ADDRESSINGformat.
-
getCommitTimeout
@Default default long getCommitTimeout()
Timeout for CAS-like operations in milliseconds. Default is 500 milliseconds.
-
getCommitRetries
@Default default int getCommitRetries()
Maximum retries for CAS-like operations. Default is unlimited.
-
getRetryInitialSleepMillisLower
@Default default long getRetryInitialSleepMillisLower()
When the database adapter has to retry an operation due to a concurrent, conflicting update to the database state, this parameter defines the initial lower bound of the sleep time. Default is 5 ms.
-
getRetryInitialSleepMillisUpper
@Default default long getRetryInitialSleepMillisUpper()
When the database adapter has to retry an operation due to a concurrent, conflicting update to the database state, this parameter defines the initial upper bound of the sleep time. Default is 25 ms.
-
getRetryMaxSleepMillis
@Default default long getRetryMaxSleepMillis()
When the database adapter has to retry an operation due to a concurrent, conflicting update to the database state, this parameter defines the maximum sleep time. Each retry doubles thelowerandupperbounds of the random sleep time, unless the doubled upper bound would exceed the value of this configuration property. Default is 75 ms.
-
getClock
@Default default java.time.Clock getClock()
TheClockto use.
-
currentTimeInMicros
@Redacted @Auxiliary @NonAttribute default long currentTimeInMicros()
Returns the current time in microseconds since epoch.
-
getParentsPerRefLogEntry
@Default default int getParentsPerRefLogEntry()
The number of Ancestor (reflogId, commitHash) stored inRefLog#getParents(). Defaults to 20.
-
getAssumedWallClockDriftMicros
@Default default long getAssumedWallClockDriftMicros()
The assumed wall-clock drift between multiple Nessie instances in microseconds.
-
-