Package org.infinispan.xsite.irac
Interface IracManager
-
- All Known Implementing Classes:
DefaultIracManager,NoOpIracManager
public interface IracManagerIt manages the keys changed in the local cluster and sends to all asynchronous backup configured.The
lockOwneris the last command (or transaction) who updated the key. It is used to detect conflicting local updates while sending to the remote backups (sites).- Since:
- 11.0
- Author:
- Pedro Ruivo
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcleanupKey(Object key, Object lockOwner, IracMetadata tombstone)Sets thekeyas not changed and remove any tombstone related to it.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
-
trackUpdatedKey
void trackUpdatedKey(Object key, Object lockOwner)
Sets thekeyas changed by thelockOwner.- Parameters:
key- The key changed.lockOwner- The lock owner who updated the key.
-
trackUpdatedKeys
<K> void trackUpdatedKeys(Collection<K> keys, Object lockOwner)
Sets all the keys inkeysas changed by thelockOwner.- Parameters:
keys- ACollectionof keys changed.lockOwner- The lock owner who updated the keys.
-
trackKeysFromTransaction
void trackKeysFromTransaction(Stream<WriteCommand> modifications, GlobalTransaction lockOwner)
Sets all keys affected by the transaction as changed.- Parameters:
modifications- TheStreamof modifications made by the transaction.lockOwner- TheGlobalTransaction.
-
trackClear
void trackClear()
Sets all keys as removed.
-
cleanupKey
void cleanupKey(Object key, Object lockOwner, IracMetadata tombstone)
Sets 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.- Parameters:
key- The key.lockOwner- The lock owner who updated the key.tombstone- The tombstone (can benull).
-
onTopologyUpdate
void onTopologyUpdate(CacheTopology oldCacheTopology, CacheTopology newCacheTopology)
Notifies a topology changed.- Parameters:
oldCacheTopology- The oldCacheTopology.newCacheTopology- The newCacheTopology.
-
requestState
void requestState(Address origin, org.infinispan.commons.util.IntSet segments)
Requests the state stored in this instance for the givensegments.- Parameters:
origin- The requestor.segments- The segments requested.
-
receiveState
void receiveState(Object key, Object lockOwner, IracMetadata tombstone)
Receives the state related to thekey.- Parameters:
key- The key modified.lockOwner- The lastlockOwner.tombstone- The tombstone (can benull)
-
-