Class AvailablePartitionHandlingManager
java.lang.Object
org.infinispan.partitionhandling.impl.AvailablePartitionHandlingManager
- All Implemented Interfaces:
- PartitionHandlingManager
PartitionHandlingManager implementation when the cluster is always available.- Since:
- 8.0
- Author:
- Pedro Ruivo
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaddPartialCommit1PCTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys, List<org.infinispan.commands.write.WriteCommand> modifications) Adds a partially committed transaction.booleanaddPartialCommit2PCTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys, Map<Object, IncrementableEntryVersion> newVersions) Adds a partially committed transaction.booleanaddPartialRollbackTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys) Adds a partially aborted transaction.booleancanRollbackTransactionAfterOriginatorLeave(GlobalTransaction globalTransaction) It checks if the transaction can be aborted when the originator leaves the cluster.voidvoidvoidvoidcheckWrite(Object key) booleanisTransactionPartiallyCommitted(GlobalTransaction globalTransaction) It checks if the transaction resources (for example locks) can be released.voidonTopologyUpdate(CacheTopology cacheTopology) Notifies thePartitionHandlingManagerthat the cache topology was update.setAvailabilityMode(AvailabilityMode availabilityMode) 
- 
Method Details- 
getInstance
- 
getAvailabilityMode- Specified by:
- getAvailabilityModein interface- PartitionHandlingManager
 
- 
setAvailabilityMode- Specified by:
- setAvailabilityModein interface- PartitionHandlingManager
 
- 
checkWrite- Specified by:
- checkWritein interface- PartitionHandlingManager
 
- 
checkRead- Specified by:
- checkReadin interface- PartitionHandlingManager
 
- 
checkClearpublic void checkClear()- Specified by:
- checkClearin interface- PartitionHandlingManager
 
- 
checkBulkReadpublic void checkBulkRead()- Specified by:
- checkBulkReadin interface- PartitionHandlingManager
 
- 
getLastStableTopology- Specified by:
- getLastStableTopologyin interface- PartitionHandlingManager
 
- 
addPartialRollbackTransactionpublic boolean addPartialRollbackTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys) Description copied from interface:PartitionHandlingManagerAdds a partially aborted transaction. The transaction should be registered when it is not sure if the abort happens successfully in all the affected nodes.- Specified by:
- addPartialRollbackTransactionin interface- PartitionHandlingManager
- Parameters:
- globalTransaction- the global transaction.
- affectedNodes- the nodes involved in the transaction and they must abort the transaction.
- lockedKeys- the keys locally locked.
- Returns:
- trueif the- PartitionHandlingManagerwill handle it,- falseotherwise.
 
- 
addPartialCommit2PCTransactionpublic boolean addPartialCommit2PCTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys, Map<Object, IncrementableEntryVersion> newVersions) Description copied from interface:PartitionHandlingManagerAdds a partially committed transaction. The transaction is committed in the second phase and it is register if it is not sure that the transaction was committed successfully in all the affected nodes.- Specified by:
- addPartialCommit2PCTransactionin interface- PartitionHandlingManager
- Parameters:
- 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.
- Returns:
- trueif the- PartitionHandlingManagerwill handle it,- falseotherwise.
 
- 
addPartialCommit1PCTransactionpublic boolean addPartialCommit1PCTransaction(GlobalTransaction globalTransaction, Collection<Address> affectedNodes, Collection<Object> lockedKeys, List<org.infinispan.commands.write.WriteCommand> modifications) Description copied from interface:PartitionHandlingManagerAdds a partially committed transaction. The transaction is committed in one phase and it is register if it is not sure that the transaction was committed successfully in all the affected nodes.- Specified by:
- addPartialCommit1PCTransactionin interface- PartitionHandlingManager
- Parameters:
- 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.
- Returns:
- trueif the- PartitionHandlingManagerwill handle it,- falseotherwise.
 
- 
isTransactionPartiallyCommittedDescription copied from interface:PartitionHandlingManagerIt checks if the transaction resources (for example locks) can be released. The transaction resource can't be released when the transaction is partially committed.- Specified by:
- isTransactionPartiallyCommittedin interface- PartitionHandlingManager
- Parameters:
- globalTransaction- the transaction.
- Returns:
- trueif the resources can be released,- falseotherwise.
 
- 
getPartialTransactions- Specified by:
- getPartialTransactionsin interface- PartitionHandlingManager
- Returns:
- a collection of partial committed or aborted transactions.
 
- 
canRollbackTransactionAfterOriginatorLeaveDescription copied from interface:PartitionHandlingManagerIt checks if the transaction can be aborted when the originator leaves the cluster. The only case in which it is not possible to abort is when partition handling is enabled and the originator didn't leave gracefully. The transaction will complete when the partition heals.- Specified by:
- canRollbackTransactionAfterOriginatorLeavein interface- PartitionHandlingManager
- Parameters:
- globalTransaction- the global transaction.
- Returns:
- trueif the transaction can be aborted,- falseotherwise.
 
- 
onTopologyUpdateDescription copied from interface:PartitionHandlingManagerNotifies thePartitionHandlingManagerthat the cache topology was update. It detects when the partition is merged and tries to complete all the partially completed transactions.- Specified by:
- onTopologyUpdatein interface- PartitionHandlingManager
- Parameters:
- cacheTopology- the new cache topology.
 
 
-