public class CacheGroup extends Object implements Group, AutoCloseable
Group implementation based on the topology of a cache.Group.Listener| Constructor and Description |
|---|
CacheGroup(CacheGroupConfiguration config) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(Group.Listener listener)
Registers a membership listener for the group.
|
void |
close() |
Node |
getCoordinatorNode()
Returns the group coordinator node.
|
Node |
getLocalNode()
Returns the local node.
|
String |
getName()
Returns the name of this group.
|
List<Node> |
getNodes()
Returns the list of nodes that are members of this group.
|
boolean |
isCoordinator()
Indicates whether or not we are the group coordinator.
|
void |
removeListener(Group.Listener listener)
Removes a registered listener from the group.
|
void |
topologyChanged(org.infinispan.notifications.cachelistener.event.TopologyChangedEvent<?,?> event) |
void |
viewChanged(org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent event) |
public CacheGroup(CacheGroupConfiguration config)
public void close()
close in interface AutoCloseablepublic String getName()
Grouppublic boolean isCoordinator()
GroupisCoordinator in interface Grouppublic Node getLocalNode()
GroupgetLocalNode in interface Grouppublic Node getCoordinatorNode()
GroupgetCoordinatorNode in interface Grouppublic List<Node> getNodes()
Grouppublic void viewChanged(org.infinispan.notifications.cachemanagerlistener.event.ViewChangedEvent event)
public void topologyChanged(org.infinispan.notifications.cachelistener.event.TopologyChangedEvent<?,?> event)
public void addListener(Group.Listener listener)
GroupaddListener in interface Grouplistener - listener to be addedpublic void removeListener(Group.Listener listener)
GroupremoveListener in interface Grouplistener - listener to be removedCopyright © 2023 JBoss by Red Hat. All rights reserved.