public class DatabaseOptions
extends java.lang.Object
Database
.Constructor and Description |
---|
DatabaseOptions(OptionConsumer consumer) |
Modifier and Type | Method and Description |
---|---|
OptionConsumer |
getOptionConsumer()
Returns the object on which these options are being set.
|
void |
setDatacenterId(java.lang.String value)
Specify the datacenter ID that was passed to fdbserver processes running in the same datacenter as this client, for better location-aware load balancing.
|
void |
setLocationCacheSize(long value)
Set the size of the client location cache.
|
void |
setMachineId(java.lang.String value)
Specify the machine ID that was passed to fdbserver processes running on the same machine as this client, for better location-aware load balancing.
|
void |
setMaxWatches(long value)
Set the maximum number of watches allowed to be outstanding on a database connection.
|
void |
setSnapshotRywDisable()
Snapshot read operations will not see the results of writes done in the same transaction.
|
void |
setSnapshotRywEnable()
Snapshot read operations will see the results of writes done in the same transaction.
|
void |
setTransactionCausalReadRisky()
The read version will be committed, and usually will be the latest committed, but might not be the latest committed in the event of a simultaneous fault and misbehaving clock.
|
void |
setTransactionIncludePortInAddress()
Addresses returned by get_addresses_for_key include the port when enabled.
|
void |
setTransactionLoggingMaxFieldLength(long value)
Sets the maximum escaped length of key and value fields to be logged to the trace file via the LOG_TRANSACTION option.
|
void |
setTransactionMaxRetryDelay(long value)
Set the maximum amount of backoff delay incurred in the call to
onError if the error is retryable. |
void |
setTransactionRetryLimit(long value)
Set a maximum number of retries after which additional calls to
onError will throw the most recently seen error code. |
void |
setTransactionSizeLimit(long value)
Set the maximum transaction size in bytes.
|
void |
setTransactionTimeout(long value)
Set a timeout in milliseconds which, when elapsed, will cause each transaction automatically to be cancelled.
|
public DatabaseOptions(OptionConsumer consumer)
public void setLocationCacheSize(long value)
value
- Max location cache entriespublic void setMaxWatches(long value)
value
- Max outstanding watchespublic void setMachineId(java.lang.String value)
value
- Hexadecimal IDpublic void setDatacenterId(java.lang.String value)
value
- Hexadecimal IDpublic void setSnapshotRywEnable()
public void setSnapshotRywDisable()
public void setTransactionLoggingMaxFieldLength(long value)
transaction_logging_max_field_length
option of each transaction created by this database. See the transaction option description for more information.value
- Maximum length of escaped key and value fields.public void setTransactionTimeout(long value)
timeout
option of each transaction created by this database. See the transaction option description for more information. Using this option requires that the API version is 610 or higher.value
- value in milliseconds of timeoutpublic void setTransactionRetryLimit(long value)
onError
will throw the most recently seen error code. This sets the retry_limit
option of each transaction created by this database. See the transaction option description for more information.value
- number of times to retrypublic void setTransactionMaxRetryDelay(long value)
onError
if the error is retryable. This sets the max_retry_delay
option of each transaction created by this database. See the transaction option description for more information.value
- value in milliseconds of maximum delaypublic void setTransactionSizeLimit(long value)
size_limit
option on each transaction created by this database. See the transaction option description for more information.value
- value in bytespublic void setTransactionCausalReadRisky()
public void setTransactionIncludePortInAddress()
public OptionConsumer getOptionConsumer()