public interface SelectForUpdateBasedTransaction
AbstractSelectForUpdateBasedProxyManager typically performs in reaction to user request.
The typical flow is following:
begin(Optional)tryLockAndGet(Optional)update(byte[],RemoteBucketState,Optional)commit(Optional)release()| Modifier and Type | Method and Description |
|---|---|
void |
begin(Optional<Long> timeoutNanos)
Begins transaction if underlying storage requires transactions.
|
void |
commit(Optional<Long> timeoutNanos)
Commits transaction if underlying storage requires transactions
|
void |
release()
Frees resources associated with this transaction
|
void |
rollback()
Rollbacks transaction if underlying storage requires transactions
|
boolean |
tryInsertEmptyData(Optional<Long> timeoutNanos)
Creates empty data by for the key associated with this transaction.
|
LockAndGetResult |
tryLockAndGet(Optional<Long> timeoutNanos)
Locks data by the key associated with this transaction and returns data that is associated with the key.
|
void |
update(byte[] data,
RemoteBucketState newState,
Optional<Long> timeoutNanos)
Updates the data by the key associated with this transaction.
|
void begin(Optional<Long> timeoutNanos)
commit(Optional) or rollback() will be called if begin(Optional) returns successfully.timeoutNanos - optional timeout in nanosecondsvoid rollback()
void commit(Optional<Long> timeoutNanos)
timeoutNanos - optional timeout in nanosecondsLockAndGetResult tryLockAndGet(Optional<Long> timeoutNanos)
timeoutNanos - optional timeout in nanosecondsboolean tryInsertEmptyData(Optional<Long> timeoutNanos)
timeoutNanos - optional timeout in nanosecondsvoid update(byte[] data,
RemoteBucketState newState,
Optional<Long> timeoutNanos)
data - bucket state to persistsnewState - new state of bucket - can be used to extract additional data is useful for persistence or logging.timeoutNanos - optional timeout in nanosecondsvoid release()
Copyright © 2024. All rights reserved.