- add
void add(Key key, Value value)
Performs an addition of little-endian integers. If the existing value
in the database is not present or shorter than `param`, it is first
extended to the length of `param` with zero bytes. If `param` is
shorter than the existing value in the database, the existing value is
truncated to match the length of `param`. The integers to be added
must be stored in a little-endian representation. They can be signed
in two's complement representation or unsigned. You can add to an integer
at a known offset in the value by prepending the appropriate number of
zero bytes to `param` and padding with zero bytes to match the length
of the value. However, this offset technique requires that you know the
addition will not cause the integer field within the value to overflow.
- addReadConflictRange
void addReadConflictRange(RangeInfo info)
Undocumented in source. Be warned that the author may not have intended to support it.
- addWriteConflictRange
void addWriteConflictRange(RangeInfo info)
Undocumented in source. Be warned that the author may not have intended to support it.
- bitAnd
void bitAnd(Key key, Value value)
Performs a bitwise `and` operation. If the existing value in the
database is not present or shorter than `param`, it is first extended
to the length of `param` with zero bytes. If `param` is shorter than
the existing value in the database, the existing value is truncated to
match the length of `param`.
- bitMax
void bitMax(Key key, Value value)
Performs a little-endian comparison of byte strings.
If the existing value in the database is not present or shorter than
`param`, it is first extended to the length of `param` with zero
bytes.
If `param` is shorter than the existing value in the database, the
existing value is truncated to match the length of `param`.
The larger of the two values is then stored in the database.
- bitMin
void bitMin(Key key, Value value)
Performs a little-endian comparison of byte strings.
If the existing value in the database is not present or shorter than
`param`, it is first extended to the length of `param` with zero
bytes.
If `param` is shorter than the existing value in the database, the
existing value is truncated to match the length of `param`.
The smaller of the two values is then stored in the database.
- bitOr
void bitOr(Key key, Value value)
Performs a bitwise `or` operation. If the existing value in the
database is not present or shorter than `param`, it is first extended
to the length of `param` with zero bytes. If `param` is shorter than
the existing value in the database, the existing value is truncated to
match the length of `param`.
- bitXor
void bitXor(Key key, Value value)
Performs a bitwise `xor` operation. If the existing value in the
database is not present or shorter than `param`, it is first extended
to the length of `param` with zero bytes. If `param` is shorter than
the existing value in the database, the existing value is truncated to
match the length of `param`.
- cancel
void cancel()
Undocumented in source. Be warned that the author may not have intended to support it.
- clear
void clear(Key key)
Undocumented in source.
- clearRange
void clearRange(RangeInfo info)
Undocumented in source.
- commit
void commit()
Undocumented in source. Be warned that the author may not have intended to support it.
- commitAsync
auto commitAsync(VoidFutureCallback callback)
Undocumented in source. Be warned that the author may not have intended to support it.
- dispose
void dispose()
Undocumented in source. Be warned that the author may not have intended to support it.
- get
shared(Value) get(Key key)
Undocumented in source.
- getAddressesForKey
shared(string[]) getAddressesForKey(Key key)
Undocumented in source.
- getAddressesForKeyAsync
shared(StringFuture) getAddressesForKeyAsync(Key key, StringFutureCallback callback)
Undocumented in source.
- getAsync
shared(ValueFuture) getAsync(Key key, ValueFutureCallback callback)
Undocumented in source.
- getCommittedVersion
long getCommittedVersion()
Undocumented in source. Be warned that the author may not have intended to support it.
- getKey
shared(Key) getKey(Selector selector)
Undocumented in source. Be warned that the author may not have intended to support it.
- getKeyAsync
shared(KeyFuture) getKeyAsync(Selector selector, KeyFutureCallback callback)
Undocumented in source. Be warned that the author may not have intended to support it.
- getRange
RecordRange getRange(RangeInfo info)
- getRangeAsync
shared(KeyValueFuture) getRangeAsync(RangeInfo info, KeyValueFutureCallback callback)
- getReadVersion
ulong getReadVersion()
Undocumented in source. Be warned that the author may not have intended to support it.
- getReadVersionAsync
shared(VersionFuture) getReadVersionAsync(VersionFutureCallback callback)
Undocumented in source. Be warned that the author may not have intended to support it.
- onError
void onError(FDBException ex)
Undocumented in source. Be warned that the author may not have intended to support it.
- onErrorAsync
shared(VoidFuture) onErrorAsync(FDBException ex, VoidFutureCallback callback)
Undocumented in source. Be warned that the author may not have intended to support it.
- opIndex
shared(Value) opIndex(Key key)
Undocumented in source. Be warned that the author may not have intended to support it.
- opIndex
RecordRange opIndex(RangeInfo info)
Undocumented in source. Be warned that the author may not have intended to support it.
- opIndexAssign
inout(Value) opIndexAssign(inout(Value) value, Key key)
Undocumented in source. Be warned that the author may not have intended to support it.
- reset
void reset()
Resets transaction to its initial state
- run
void run(WorkFunc func)
Undocumented in source. Be warned that the author may not have intended to support it.
- runAsync
auto runAsync(WorkFunc func, VoidFutureCallback commitCallback)
Undocumented in source. Be warned that the author may not have intended to support it.
- set
void set(Key key, Value value)
Undocumented in source.
- setAccessSystemKeys
void setAccessSystemKeys()
Allows this transaction to read and modify system keys (those that start
with the byte 0xFF)
- setCausalReadDisable
void setCausalReadDisable()
Undocumented in source. Be warned that the author may not have intended to support it.
- setCausalReadRisky
void setCausalReadRisky()
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 fault
or partition
- setCausalWriteRisky
void setCausalWriteRisky()
The transaction, if not self-conflicting, may be committed a second time
after commit succeeds, in the event of a fault
- setCheckWritesEnable
void setCheckWritesEnable()
Undocumented in source. Be warned that the author may not have intended to support it.
- setDebugDump
void setDebugDump()
Undocumented in source. Be warned that the author may not have intended to support it.
- setDebugRetryLogging
void setDebugRetryLogging(string transactionName)
- setInitializeNewDatabase
void setInitializeNewDatabase()
This is a write-only transaction which sets the initial configuration
- setMaxRetryDelayLimit
void setMaxRetryDelayLimit(int value)
Set the maximum amount of backoff delay incurred in the call to onError
if the error is retryable.
Defaults to 1000 ms. Valid parameter values are [0, int.MaxValue].
Like all transaction options, the maximum retry delay must be reset
after a call to onError.
If the maximum retry delay is less than the current retry delay of the
transaction, then the current retry delay will be clamped to the maximum
retry delay.
- setNextWriteNoWriteConflictRange
void setNextWriteNoWriteConflictRange()
The next write performed on this transaction will not generate a write
conflict range. As a result, other transactions which read the key(s)
being modified by the next write will not conflict with this transaction.
Care needs to be taken when using this option on a transaction that is
shared between multiple threads. When setting this option, write conflict
ranges will be disabled on the next write operation, regardless of what
thread it is on.
- setPriorityBatch
void setPriorityBatch()
Specifies that this transaction should be treated as low priority and
that default priority transactions should be processed first. Useful for
doing batch work simultaneously with latency-sensitive work
- setPrioritySystemImmediate
void setPrioritySystemImmediate()
Specifies that this transaction should be treated as highest priority and
that lower priority transactions should block behind this one. Use is
discouraged outside of low-level tools
- setReadAheadDisable
void setReadAheadDisable()
Disables read-ahead caching for range reads. Under normal operation, a
transaction will read extra rows from the database into cache if range
reads are used to page through a series of data one row at a time (i.e.
if a range read with a one row limit is followed by another one row range
read starting immediately after the result of the first).
- setReadSystemKeys
void setReadSystemKeys()
Allows this transaction to read system keys (those that start with the
byte 0xFF)
- setReadVersion
void setReadVersion(int ver)
Undocumented in source.
- setReadYourWritesDisable
void setReadYourWritesDisable()
Reads performed by a transaction will not see any prior mutations that
occured in that transaction, instead seeing the value which was in the
database at the transaction's read version. This option may provide a
small performance benefit for the client, but also disables a number of
client-side optimizations which are beneficial for transactions which
tend to read and write the same keys within a single transaction.
- setRetryLimit
void setRetryLimit(int value)
Set a maximum number of retries after which additional calls to onError
will throw the most recently seen error code. Valid parameter values are
`[-1, INT_MAX]`. If set to -1, will disable the retry limit.
- setSnapshotReadYourWriteDisable
void setSnapshotReadYourWriteDisable()
Snapshot read operations will not see the results of writes done in the
same transaction.
- setSnapshotReadYourWriteEnable
void setSnapshotReadYourWriteEnable()
Snapshot read operations will see the results of writes done in the same
transaction.
- setTimeout
void setTimeout(int value)
Set a timeout in milliseconds which, when elapsed, will cause the
transaction automatically to be cancelled. Valid parameter values are
`[0, INT_MAX]`. If set to 0, will disable all timeouts. All pending and
any future uses of the transaction will throw an exception. The
transaction can be used again after it is reset.
- watch
auto watch(Key key, VoidFutureCallback callback)
Undocumented in source.
- isSnapshot
bool isSnapshot [@property getter]
Undocumented in source.
- getKey
shared(Key) getKey(Selector selector)
Undocumented in source.
- getKeyAsync
shared(KeyFuture) getKeyAsync(Selector selector, KeyFutureCallback callback)
Undocumented in source.
- get
shared(Value) get(Key key)
Undocumented in source.
- getAsync
shared(ValueFuture) getAsync(Key key, ValueFutureCallback callback)
Undocumented in source.
- getRange
RecordRange getRange(RangeInfo info)
- getRangeAsync
shared(KeyValueFuture) getRangeAsync(RangeInfo info, KeyValueFutureCallback callback)
- addReadConflictRange
void addReadConflictRange(RangeInfo info)
Undocumented in source.
- addWriteConflictRange
void addWriteConflictRange(RangeInfo info)
Undocumented in source.
- onError
void onError(FDBException ex)
Undocumented in source.
- onErrorAsync
shared(VoidFuture) onErrorAsync(FDBException ex, VoidFutureCallback callback)
Undocumented in source.
- getReadVersion
ulong getReadVersion()
Undocumented in source.
- getReadVersionAsync
shared(VersionFuture) getReadVersionAsync(VersionFutureCallback callback)
Undocumented in source.
- getCommittedVersion
long getCommittedVersion()
Undocumented in source.
- getAddressesForKey
shared(string[]) getAddressesForKey(Key key)
Undocumented in source.
- getAddressesForKeyAsync
shared(StringFuture) getAddressesForKeyAsync(Key key, StringFutureCallback callback)
Undocumented in source.
- opIndex
shared(Value) opIndex(Key key)
Undocumented in source.
- opIndex
RecordRange opIndex(RangeInfo info)
Undocumented in source.