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 |
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 timeout in milliseconds which, when elapsed, will cause a transaction automatically to be cancelled.
|
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 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)
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 setSnapshotRywEnable()
public void setSnapshotRywDisable()
public OptionConsumer getOptionConsumer()