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