Package org.infinispan.xsite.irac
Enum Class NoOpIracManager
- All Implemented Interfaces:
- Serializable,- Comparable<NoOpIracManager>,- Constable,- IracManager
A no-op implementation of 
IracManager for cache without asynchronous remote site backups.- Since:
- 11.0
- Author:
- Pedro Ruivo
- 
Nested Class SummaryNested classes/interfaces inherited from class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum Constants
- 
Method SummaryModifier and TypeMethodDescriptionChecks if the given key is expired on all other sites.booleancontainsKey(Object key) Checks if the key is present.voidIncrease the count of conflicts if merge policy discard update (local value wins)voidIncrease the count of conflicts if merge policy created a new value (merge remote value with local value)voidIncrease the count of conflicts if merge policy applies update (remote value wins)voidIncrease the count of discards.voidonTopologyUpdate(CacheTopology oldCacheTopology, CacheTopology newCacheTopology) Notifies a topology changed.voidreceiveState(int segment, Object key, Object lockOwner, IracMetadata tombstone) Receives the state related to thekey.voidremoveState(IracManagerKeyInfo state) Removes the state associated to a single key.voidrequestState(Address requestor, IntSet segments) Requests the state stored in this instance for the givensegments.voidtrackClear(boolean sendClear) Sets all keys as removed.voidtrackExpiredKey(int segment, Object key, Object lockOwner) Similar toIracManager.trackUpdatedKey(int, Object, Object)but it tracks expired keys instead.trackForStateTransfer(Collection<XSiteState> stateList) Tracks a set of keys to be sent to the remote site.voidtrackUpdatedKey(int segment, Object key, Object lockOwner) Sets thekeyas changed by thelockOwner.static NoOpIracManagerReturns the enum constant of this class with the specified name.static NoOpIracManager[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
INSTANCE
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum class has no constant with the specified name
- NullPointerException- if the argument is null
 
- 
trackUpdatedKeyDescription copied from interface:IracManagerSets thekeyas changed by thelockOwner.- Specified by:
- trackUpdatedKeyin interface- IracManager
- Parameters:
- segment- The key's segment.
- key- The key changed.
- lockOwner- The lock owner who updated the key.
 
- 
trackExpiredKeyDescription copied from interface:IracManagerSimilar toIracManager.trackUpdatedKey(int, Object, Object)but it tracks expired keys instead.Expired key need a different conflict resolution algorithm since remove expired should never win any conflict. - Specified by:
- trackExpiredKeyin interface- IracManager
- Parameters:
- segment- The key's segment.
- key- The key expired.
- lockOwner- The lock owner who updated the key.
 
- 
trackForStateTransferDescription copied from interface:IracManagerTracks a set of keys to be sent to the remote site.There is no much difference between this method and IracManager.trackUpdatedKey(int, Object, Object). It just returns aCompletionStageto notify when the keys were sent. It is required by the cross-site state transfer protocol to know when it has finish.- Specified by:
- trackForStateTransferin interface- IracManager
- Parameters:
- stateList- The list of- XSiteState.
- Returns:
- A CompletionStagewhich is completed when all the keys instateListhave been sent to the remote site.
 
- 
trackClearpublic void trackClear(boolean sendClear) Description copied from interface:IracManagerSets all keys as removed.- Specified by:
- trackClearin interface- IracManager
- Parameters:
- sendClear- if- true, an- IracClearKeysRequestis sent to the backup sites.
 
- 
removeStateDescription copied from interface:IracManagerRemoves the state associated to a single key.- Specified by:
- removeStatein interface- IracManager
- Parameters:
- state- The state to remove.
 
- 
onTopologyUpdateDescription copied from interface:IracManagerNotifies a topology changed.- Specified by:
- onTopologyUpdatein interface- IracManager
- Parameters:
- oldCacheTopology- The old- CacheTopology.
- newCacheTopology- The new- CacheTopology.
 
- 
requestStateDescription copied from interface:IracManagerRequests the state stored in this instance for the givensegments.- Specified by:
- requestStatein interface- IracManager
- Parameters:
- requestor- The requestor.
- segments- The segments requested.
 
- 
receiveStateDescription copied from interface:IracManagerReceives the state related to thekey.- Specified by:
- receiveStatein interface- IracManager
- Parameters:
- segment- The key's segment.
- key- The key modified.
- lockOwner- The last- lockOwner.
- tombstone- The tombstone (can be- null)
 
- 
checkAndTrackExpirationDescription copied from interface:IracManagerChecks if the given key is expired on all other sites. If the key is expired on all other sites this will return true- Specified by:
- checkAndTrackExpirationin interface- IracManager
- Parameters:
- key- The key to check if it is expired or not
- Returns:
- Whether this key is expired on all other sites
 
- 
incrementNumberOfDiscardspublic void incrementNumberOfDiscards()Description copied from interface:IracManagerIncrease the count of discards.- Specified by:
- incrementNumberOfDiscardsin interface- IracManager
 
- 
incrementNumberOfConflictLocalWinspublic void incrementNumberOfConflictLocalWins()Description copied from interface:IracManagerIncrease the count of conflicts if merge policy discard update (local value wins)- Specified by:
- incrementNumberOfConflictLocalWinsin interface- IracManager
 
- 
incrementNumberOfConflictRemoteWinspublic void incrementNumberOfConflictRemoteWins()Description copied from interface:IracManagerIncrease the count of conflicts if merge policy applies update (remote value wins)- Specified by:
- incrementNumberOfConflictRemoteWinsin interface- IracManager
 
- 
incrementNumberOfConflictMergedpublic void incrementNumberOfConflictMerged()Description copied from interface:IracManagerIncrease the count of conflicts if merge policy created a new value (merge remote value with local value)- Specified by:
- incrementNumberOfConflictMergedin interface- IracManager
 
- 
containsKeyDescription copied from interface:IracManagerChecks if the key is present.A key is present as long as its latest update was not confirmed by all remote sites. - Specified by:
- containsKeyin interface- IracManager
- Parameters:
- key- The key to check.
- Returns:
- trueif the key is present.
 
 
-