public interface PartitionHandlingManager
Modifier and Type | Method and Description |
---|---|
boolean |
addPartialCommit1PCTransaction(GlobalTransaction globalTransaction,
Collection<Address> affectedNodes,
Collection<Object> lockedKeys,
List<WriteCommand> modifications)
Adds a partially committed transaction.
|
boolean |
addPartialCommit2PCTransaction(GlobalTransaction globalTransaction,
Collection<Address> affectedNodes,
Collection<Object> lockedKeys,
Map<Object,IncrementableEntryVersion> newVersions)
Adds a partially committed transaction.
|
boolean |
addPartialRollbackTransaction(GlobalTransaction globalTransaction,
Collection<Address> affectedNodes,
Collection<Object> lockedKeys)
Adds a partially aborted transaction.
|
boolean |
canRollbackTransactionAfterOriginatorLeave(GlobalTransaction globalTransaction)
It checks if the transaction can be aborted when the originator leaves the cluster.
|
void |
checkBulkRead() |
void |
checkClear() |
void |
checkRead(Object key,
long flagBitSet) |
void |
checkWrite(Object key) |
AvailabilityMode |
getAvailabilityMode() |
CacheTopology |
getLastStableTopology()
Deprecated.
|
Collection<GlobalTransaction> |
getPartialTransactions() |
boolean |
isTransactionPartiallyCommitted(GlobalTransaction globalTransaction)
It checks if the transaction resources (for example locks) can be released.
|
void |
onTopologyUpdate(CacheTopology cacheTopology)
Notifies the
PartitionHandlingManager that the cache topology was update. |
CompletionStage<Void> |
setAvailabilityMode(AvailabilityMode availabilityMode) |
AvailabilityMode getAvailabilityMode()
CompletionStage<Void> setAvailabilityMode(AvailabilityMode availabilityMode)
void checkWrite(Object key)
void checkRead(Object key, long flagBitSet)
void checkClear()
void checkBulkRead()
@Deprecated CacheTopology getLastStableTopology()
boolean addPartialRollbackTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys)
globalTransaction
- the global transaction.affectedNodes
- the nodes involved in the transaction and they must abort the transaction.lockedKeys
- the keys locally locked.true
if the PartitionHandlingManager
will handle it, false
otherwise.boolean addPartialCommit2PCTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys, Map<Object,IncrementableEntryVersion> newVersions)
globalTransaction
- the global transaction.affectedNodes
- the nodes involved in the transaction and they must commit it.lockedKeys
- the keys locally locked.newVersions
- the updated versions. Only used when versioning is enabled.true
if the PartitionHandlingManager
will handle it, false
otherwise.boolean addPartialCommit1PCTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys, List<WriteCommand> modifications)
globalTransaction
- the global transaction.affectedNodes
- the nodes involved in the transaction and they must commit it.lockedKeys
- the keys locally locked.modifications
- the transaction's modification log.true
if the PartitionHandlingManager
will handle it, false
otherwise.boolean isTransactionPartiallyCommitted(GlobalTransaction globalTransaction)
globalTransaction
- the transaction.true
if the resources can be released, false
otherwise.Collection<GlobalTransaction> getPartialTransactions()
boolean canRollbackTransactionAfterOriginatorLeave(GlobalTransaction globalTransaction)
globalTransaction
- the global transaction.true
if the transaction can be aborted, false
otherwise.void onTopologyUpdate(CacheTopology cacheTopology)
PartitionHandlingManager
that the cache topology was update.
It detects when the partition is merged and tries to complete all the partially completed transactions.cacheTopology
- the new cache topology.Copyright © 2021 JBoss by Red Hat. All rights reserved.