public interface CompareAndSwapBasedTransaction
Modifier and Type | Method and Description |
---|---|
boolean |
compareAndSwap(byte[] originalData,
byte[] newData)
Compares and swap data associated with key
|
Optional<byte[]> |
get()
Reads data if it exists
|
Optional<byte[]> get()
boolean compareAndSwap(byte[] originalData, byte[] newData)
originalData
- previous bucket state(can be null).newData
- new bucket statetrue
if data changed, false
if another parallel transaction achieved success instead of current transactionCopyright © 2020. All rights reserved.