public class FDBRecordContextConfig extends Object
FDBRecordContext
. Instances
of this configuration object can be passed to FDBDatabase.openContext(FDBRecordContextConfig)
to create a new transaction with various parameters set according to the values specified here.Modifier and Type | Class and Description |
---|---|
static class |
FDBRecordContextConfig.Builder
A builder of
FDBRecordContextConfig s using the standard builder pattern. |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getMdcContext()
Get the MDC context used to set additional keys and values when logging.
|
FDBTransactionPriority |
getPriority()
Get the priority for the created transaction.
|
FDBStoreTimer |
getTimer()
Get the timer to use to instrument events.
|
String |
getTransactionId()
Get the ID to use for the transaction in FDB logs.
|
long |
getTransactionTimeoutMillis()
Get the configured transaction timeout time in milliseconds.
|
FDBDatabase.WeakReadSemantics |
getWeakReadSemantics()
Get the
FDBDatabase.WeakReadSemantics
configuration used when creating the transaction. |
static FDBRecordContextConfig.Builder |
newBuilder()
Get a new builder for this class.
|
FDBRecordContextConfig.Builder |
toBuilder()
Convert the current configuration to a builder.
|
@Nullable public Map<String,String> getMdcContext()
@Nullable public FDBStoreTimer getTimer()
@Nullable public FDBDatabase.WeakReadSemantics getWeakReadSemantics()
FDBDatabase.WeakReadSemantics
configuration used when creating the transaction. This is used to determine whether this
transaction should be created with a cached read version and whether this transaction should
set the TransactionOptions.setCausalReadRisky()
option.FDBDatabase.WeakReadSemantics
to use when creating the transaction@Nonnull public FDBTransactionPriority getPriority()
FDBTransactionPriority
.@Nullable public String getTransactionId()
FDBRecordContext
for more details.public long getTransactionTimeoutMillis()
FDBDatabaseFactory.DEFAULT_TR_TIMEOUT_MILLIS
,
then the created transaction will use the default from the FDBDatabaseFactory
.@Nonnull public static FDBRecordContextConfig.Builder newBuilder()
@Nonnull public FDBRecordContextConfig.Builder toBuilder()