public class BiasManagerImpl extends Object implements BiasManager
BiasManager.Revocation| Constructor and Description |
|---|
BiasManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLocalBias(Object key,
int topologyId)
Allow reading local data if the topology is still actual.
|
void |
clear()
The cache has been cleared and therefore all biases are forgotten.
|
List<Address> |
getRemoteBias(Object key) |
boolean |
hasLocalBias(Object key)
Check if we can read local data and update last-read timestamp for this key.
|
void |
onTopologyChange(TopologyChangedEvent event) |
void |
renewRemoteBias(Object key,
Address origin)
Notify the component that the node is reading the biased entry and the bias
should not be revoked unless necessary.
|
void |
revokeLocalBias(Object key)
Stop reading local data.
|
void |
revokeLocalBiasForSegments(IntSet segments)
Stop reading local data from this segment.
|
void |
start() |
BiasManager.Revocation |
startRevokingRemoteBias(Object key,
Address newBiased)
Check if there are any nodes that have local bias, and starting replacing them
with the provided address.
|
public void start()
public void onTopologyChange(TopologyChangedEvent event)
public void addLocalBias(Object key, int topologyId)
BiasManageraddLocalBias in interface BiasManagerpublic void revokeLocalBias(Object key)
BiasManagerrevokeLocalBias in interface BiasManagerpublic void revokeLocalBiasForSegments(IntSet segments)
BiasManagerrevokeLocalBiasForSegments in interface BiasManagerpublic boolean hasLocalBias(Object key)
BiasManagerhasLocalBias in interface BiasManagerpublic List<Address> getRemoteBias(Object key)
getRemoteBias in interface BiasManagerpublic BiasManager.Revocation startRevokingRemoteBias(Object key, Address newBiased)
BiasManagerBiasManager.Revocation.biased() and is expected to send
RevokeBiasCommand to the holders and when
this completes call BiasManager.Revocation.complete() or BiasManager.Revocation.fail().
This method returns null when there is no need to revoke any bias
on remote nodes. When BiasManager.Revocation.shouldRevoke() returns false, the caller
should set up a handler through BiasManager.Revocation.handleCompose(Supplier) and
retry calling this method in the handler.startRevokingRemoteBias in interface BiasManagerpublic void renewRemoteBias(Object key, Address origin)
BiasManagerrenewRemoteBias in interface BiasManagerpublic void clear()
BiasManagerclear in interface BiasManagerCopyright © 2022 JBoss by Red Hat. All rights reserved.