Package org.infinispan.xsite.irac
Class NoOpIracManager
- java.lang.Object
-
- org.infinispan.xsite.irac.NoOpIracManager
-
- All Implemented Interfaces:
IracManager
public class NoOpIracManager extends Object implements IracManager
A no-op implementation ofIracManagerfor cache without asynchronous remote site backups.- Since:
- 11.0
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupKey(Object key, Object lockOwner, IracMetadata tombstone)Sets thekeyas not changed and remove any tombstone related to it.static NoOpIracManagergetInstance()voidonTopologyUpdate(CacheTopology oldCacheTopology, CacheTopology newCacheTopology)Notifies a topology changed.voidreceiveState(Object key, Object lockOwner, IracMetadata tombstone)Receives the state related to thekey.voidrequestState(Address origin, org.infinispan.commons.util.IntSet segments)Requests the state stored in this instance for the givensegments.voidtrackClear()Sets all keys as removed.voidtrackKeysFromTransaction(Stream<WriteCommand> modifications, GlobalTransaction lockOwner)Sets all keys affected by the transaction as changed.voidtrackUpdatedKey(Object key, Object lockOwner)Sets thekeyas changed by thelockOwner.<K> voidtrackUpdatedKeys(Collection<K> keys, Object lockOwner)Sets all the keys inkeysas changed by thelockOwner.
-
-
-
Method Detail
-
getInstance
public static NoOpIracManager getInstance()
-
trackUpdatedKey
public void trackUpdatedKey(Object key, Object lockOwner)
Description copied from interface:IracManagerSets thekeyas changed by thelockOwner.- Specified by:
trackUpdatedKeyin interfaceIracManager- Parameters:
key- The key changed.lockOwner- The lock owner who updated the key.
-
trackUpdatedKeys
public <K> void trackUpdatedKeys(Collection<K> keys, Object lockOwner)
Description copied from interface:IracManagerSets all the keys inkeysas changed by thelockOwner.- Specified by:
trackUpdatedKeysin interfaceIracManager- Parameters:
keys- ACollectionof keys changed.lockOwner- The lock owner who updated the keys.
-
trackKeysFromTransaction
public void trackKeysFromTransaction(Stream<WriteCommand> modifications, GlobalTransaction lockOwner)
Description copied from interface:IracManagerSets all keys affected by the transaction as changed.- Specified by:
trackKeysFromTransactionin interfaceIracManager- Parameters:
modifications- TheStreamof modifications made by the transaction.lockOwner- TheGlobalTransaction.
-
trackClear
public void trackClear()
Description copied from interface:IracManagerSets all keys as removed.- Specified by:
trackClearin interfaceIracManager
-
cleanupKey
public void cleanupKey(Object key, Object lockOwner, IracMetadata tombstone)
Description copied from interface:IracManagerSets thekeyas not changed and remove any tombstone related to it.If
lockOwnerisn't the last one who updated the key, this method is a no-op.- Specified by:
cleanupKeyin interfaceIracManager- Parameters:
key- The key.lockOwner- The lock owner who updated the key.tombstone- The tombstone (can benull).
-
onTopologyUpdate
public void onTopologyUpdate(CacheTopology oldCacheTopology, CacheTopology newCacheTopology)
Description copied from interface:IracManagerNotifies a topology changed.- Specified by:
onTopologyUpdatein interfaceIracManager- Parameters:
oldCacheTopology- The oldCacheTopology.newCacheTopology- The newCacheTopology.
-
requestState
public void requestState(Address origin, org.infinispan.commons.util.IntSet segments)
Description copied from interface:IracManagerRequests the state stored in this instance for the givensegments.- Specified by:
requestStatein interfaceIracManager- Parameters:
origin- The requestor.segments- The segments requested.
-
receiveState
public void receiveState(Object key, Object lockOwner, IracMetadata tombstone)
Description copied from interface:IracManagerReceives the state related to thekey.- Specified by:
receiveStatein interfaceIracManager- Parameters:
key- The key modified.lockOwner- The lastlockOwner.tombstone- The tombstone (can benull)
-
-