Package org.infinispan.scattered.impl
Class BiasManagerImpl
java.lang.Object
org.infinispan.scattered.impl.BiasManagerImpl
- All Implemented Interfaces:
BiasManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.scattered.BiasManager
BiasManager.Revocation -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocalBias(Object key, int topologyId) Allow reading local data if the topology is still actual.voidclear()The cache has been cleared and therefore all biases are forgotten.getRemoteBias(Object key) booleanhasLocalBias(Object key) Check if we can read local data and update last-read timestamp for this key.voidvoidrenewRemoteBias(Object key, Address origin) Notify the component that the node is reading the biased entry and the bias should not be revoked unless necessary.voidrevokeLocalBias(Object key) Stop reading local data.voidrevokeLocalBiasForSegments(IntSet segments) Stop reading local data from this segment.voidstart()startRevokingRemoteBias(Object key, Address newBiased) Check if there are any nodes that have local bias, and starting replacing them with the provided address.
-
Constructor Details
-
BiasManagerImpl
public BiasManagerImpl()
-
-
Method Details
-
start
public void start() -
onTopologyChange
-
addLocalBias
Description copied from interface:BiasManagerAllow reading local data if the topology is still actual.- Specified by:
addLocalBiasin interfaceBiasManager
-
revokeLocalBias
Description copied from interface:BiasManagerStop reading local data.- Specified by:
revokeLocalBiasin interfaceBiasManager
-
revokeLocalBiasForSegments
Description copied from interface:BiasManagerStop reading local data from this segment.- Specified by:
revokeLocalBiasForSegmentsin interfaceBiasManager
-
hasLocalBias
Description copied from interface:BiasManagerCheck if we can read local data and update last-read timestamp for this key.- Specified by:
hasLocalBiasin interfaceBiasManager- Returns:
-
getRemoteBias
- Specified by:
getRemoteBiasin interfaceBiasManager
-
startRevokingRemoteBias
Description copied from interface:BiasManagerCheck if there are any nodes that have local bias, and starting replacing them with the provided address. The caller can find out the currently biased nodes fromBiasManager.Revocation.biased()and is expected to sendRevokeBiasCommandto the holders and when this completes callBiasManager.Revocation.complete()orBiasManager.Revocation.fail(). This method returnsnullwhen there is no need to revoke any bias on remote nodes. WhenBiasManager.Revocation.shouldRevoke()returns false, the caller should set up a handler throughBiasManager.Revocation.handleCompose(Supplier)and retry calling this method in the handler.- Specified by:
startRevokingRemoteBiasin interfaceBiasManager- Returns:
-
renewRemoteBias
Description copied from interface:BiasManagerNotify the component that the node is reading the biased entry and the bias should not be revoked unless necessary.- Specified by:
renewRemoteBiasin interfaceBiasManager
-
clear
public void clear()Description copied from interface:BiasManagerThe cache has been cleared and therefore all biases are forgotten.- Specified by:
clearin interfaceBiasManager
-