Package com.palantir.atlasdb.spi
Interface AtlasDbFactory<MERGED_CONFIG extends KeyValueServiceConfig>
-
public interface AtlasDbFactory<MERGED_CONFIG extends KeyValueServiceConfig>
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_INITIALIZE_ASYNC
static com.palantir.logsafe.logger.SafeLogger
log
static long
NO_OP_FAST_FORWARD_TIMESTAMP
static java.util.function.LongSupplier
THROWING_FRESH_TIMESTAMP_SOURCE
-
Method Summary
-
-
-
Field Detail
-
log
static final com.palantir.logsafe.logger.SafeLogger log
-
NO_OP_FAST_FORWARD_TIMESTAMP
static final long NO_OP_FAST_FORWARD_TIMESTAMP
- See Also:
- Constant Field Values
-
DEFAULT_INITIALIZE_ASYNC
static final boolean DEFAULT_INITIALIZE_ASYNC
- See Also:
- Constant Field Values
-
THROWING_FRESH_TIMESTAMP_SOURCE
static final java.util.function.LongSupplier THROWING_FRESH_TIMESTAMP_SOURCE
-
-
Method Detail
-
getType
String getType()
-
createMergedKeyValueServiceConfig
default MERGED_CONFIG createMergedKeyValueServiceConfig(KeyValueServiceConfig config, com.palantir.refreshable.Refreshable<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig, Optional<String> namespace)
Create the config (a merging of the given install and runtime config) that will be passed tocreateRawKeyValueService(com.palantir.atlasdb.util.MetricsManager, MERGED_CONFIG, com.palantir.refreshable.Refreshable<java.util.Optional<com.palantir.atlasdb.spi.KeyValueServiceRuntimeConfig>>, java.util.Optional<com.palantir.atlasdb.config.LeaderConfig>, java.util.Optional<java.lang.String>, java.util.function.LongSupplier, boolean)
.KeyValueServiceConfig.defaultGetRangesConcurrency()
andKeyValueServiceConfig.concurrentGetRangesThreadPoolSize()
will be used from the resulting merged config to initialize the transaction manager.
-
createRawKeyValueService
KeyValueService createRawKeyValueService(MetricsManager metricsManager, MERGED_CONFIG config, com.palantir.refreshable.Refreshable<Optional<KeyValueServiceRuntimeConfig>> runtimeConfig, Optional<LeaderConfig> leaderConfig, Optional<String> namespace, java.util.function.LongSupplier freshTimestampSource, boolean initializeAsync)
Creates a KeyValueService instance of type according to the config parameter.- Parameters:
config
- Configuration file.runtimeConfig
- Runtime configuration file.leaderConfig
- If the implementation supports it, the optional leader configuration.namespace
- If the implementation supports it, this is the namespace to use when the namespace in config is absent. If both are present, they must match.freshTimestampSource
- If present, a source of fresh timestamps, which may be relevant for some KVS operations.initializeAsync
- If the implementations supports it, and initializeAsync is true, the KVS will initialize asynchronously when synchronous initialization fails.- Returns:
- The requested KeyValueService instance
-
createManagedTimestampService
com.palantir.timestamp.ManagedTimestampService createManagedTimestampService(KeyValueService rawKvs, Optional<TableReference> tableReferenceOverride, boolean initializeAsync)
-
createTimestampStoreInvalidator
default com.palantir.timestamp.TimestampStoreInvalidator createTimestampStoreInvalidator(KeyValueService rawKvs, Optional<TableReference> tableReferenceOverride)
-
-