Package org.jgroups.protocols.relay
Class Topology
java.lang.Object
org.jgroups.protocols.relay.Topology
Provides a cache of all sites and their members (addresses, IP addresses, site masters etc) in a network of
autonomous sites. The cache is an approximation, and is refreshed on reception of
RelayHeader.SITES_UP
or RelayHeader.SITES_DOWN notifications. A refresh can also be triggered programmatically.
- Since:
- 5.2.15
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected final RELAYprotected BiConsumer<String, View> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncache()protected StringbooleanglobalViews(boolean b) print()Dumps the members for a given site, or all sitesprotected voidCalled when a response has been received.refresh()Refreshes the topology for a given site.removeAll(Collection<String> sites) Sets a view handlertoString()
-
Field Details
-
relay
-
cache
-
view_handler
-
global_views
protected boolean global_views
-
-
Constructor Details
-
Topology
-
-
Method Details
-
cache
-
globalViews
public boolean globalViews() -
globalViews
-
setViewHandler
Sets a view handler- Parameters:
c- The view handler. Arguments are the site and theViewof that site)
-
refresh
-
refresh
Refreshes the topology for a given site.- Parameters:
site- The site. If null, all sites will be refreshed.
-
refresh
-
print
-
print
Dumps the members for a given site, or all sites- Parameters:
site- The site name. Dumps all sites if null- Returns:
- A string of all sites and their members
-
removeAll
-
toString
-
dumpSite
-
put
Called when a response has been received. Updates the internal cache
-