public interface CompareAndSwapOperation
| Modifier and Type | Method and Description |
|---|---|
boolean |
compareAndSwap(byte[] originalData,
byte[] newData,
RemoteBucketState newState)
Compares and swap data associated with key
|
Optional<byte[]> |
getStateData()
Reads data if it exists
|
Optional<byte[]> getStateData()
boolean compareAndSwap(byte[] originalData,
byte[] newData,
RemoteBucketState newState)
originalData - previous bucket state(can be null).newData - new bucket statenewState - new state of bucket - can be used to extract additional data is useful for persistence or logging.true if data changed, false if another parallel transaction achieved success instead of current transactionCopyright © 2022. All rights reserved.