public interface LockBasedTransaction
AbstractLockBasedProxyManager typically performs in reaction to user request.
The typical flow is following:
begin()lockAndGet()update(byte[], RemoteBucketState)unlock()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 |
create(byte[] data,
RemoteBucketState state)
Creates the data by the key associated with this transaction.
|
byte[] |
lockAndGet()
Locks data by the key associated with this transaction and returns data that is associated with the key.
|
void |
release()
Frees resources associated with this transaction
|
void |
rollback()
Rollbacks transaction if underlying storage requires transactions
|
void |
unlock()
Unlocks data by the key associated with this transaction.
|
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()
byte[] lockAndGet()
unlock() will be called if lockAndGet() returns successfully.void unlock()
void create(byte[] data,
RemoteBucketState state)
data - bucket state to persistsstate - of bucket - can be used to extract additional data is useful for persistence or logging.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.