public class TxnReservedCapacityCounterImpl extends Object implements TxnReservedCapacityCounter
MapStoreConfig.writeCoalescing is off.
Every record-store has its own counter instance.TxnReservedCapacityCounterEMPTY_COUNTER| Constructor and Description |
|---|
TxnReservedCapacityCounterImpl(NodeWideUsedCapacityCounter nodeWideUsedCapacityCounter) |
| Modifier and Type | Method and Description |
|---|---|
void |
decrement(UUID txnId)
Decrements 2 counters for supplied txnId.
|
void |
decrementOnlyReserved(UUID txnId)
Decrements capacity count for a transaction.
|
Map<UUID,Long> |
getReservedCapacityCountPerTxnId()
Returns reserved capacity counts of all
transactions which happened on this record store.
|
boolean |
hasReservedCapacity(UUID txnId) |
void |
increment(UUID txnId,
boolean backup)
Increments 2 counters for supplied txnId.
|
void |
putAll(Map<UUID,Long> reservedCapacityPerTxnId)
Increments 2 counters with supplied txn reserved capacity counts.
|
void |
releaseAllReservations()
Releases all reserved capacity info on this counter.
|
public TxnReservedCapacityCounterImpl(NodeWideUsedCapacityCounter nodeWideUsedCapacityCounter)
public void increment(@Nonnull UUID txnId, boolean backup)
ReachedMaxSizeExceptionincrement in interface TxnReservedCapacityCountertxnId - id of transactionbackup - set true if counter increment
operation is on a backup partition,
otherwise set falseReachedMaxSizeException - (only when backup is false)public void putAll(@Nonnull Map<UUID,Long> reservedCapacityPerTxnId)
putAll in interface TxnReservedCapacityCounterreservedCapacityPerTxnId - reserved capacities per txnIdpublic boolean hasReservedCapacity(@Nonnull UUID txnId)
hasReservedCapacity in interface TxnReservedCapacityCountertxnId - id of transactiontrue if txnId has reserved
capacity, otherwise return falsepublic void decrement(@Nonnull UUID txnId)
decrement in interface TxnReservedCapacityCountertxnId - id of transactionpublic void decrementOnlyReserved(@Nonnull UUID txnId)
TxnReservedCapacityCounterdecrementOnlyReserved in interface TxnReservedCapacityCountertxnId - id of transactionpublic void releaseAllReservations()
TxnReservedCapacityCounterreleaseAllReservations in interface TxnReservedCapacityCounterpublic Map<UUID,Long> getReservedCapacityCountPerTxnId()
TxnReservedCapacityCountergetReservedCapacityCountPerTxnId in interface TxnReservedCapacityCounterCopyright © 2019 Hazelcast, Inc.. All rights reserved.