public class GossipClient
extends java.lang.Object
Requires JDK >= 1.3 due to the use of Timer.
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.logging.Log |
log |
Constructor and Description |
---|
GossipClient(IpAddress gossip_host,
long expiry)
Creates the GossipClient
|
GossipClient(java.util.Vector gossip_hosts,
long expiry)
Creates the GossipClient
|
Modifier and Type | Method and Description |
---|---|
void |
addGossipRouter(IpAddress gossip_host)
Adds a GossipRouter to be accessed.
|
void |
destroy() |
java.util.List |
getMembers(java.lang.String group)
Returns all members of a given group
|
boolean |
isRefresherEnabled() |
static void |
main(java.lang.String[] args) |
void |
register(java.lang.String group,
Address mbr)
Adds the member to the given group.
|
void |
setRefresherEnabled(boolean refresher_enabled) |
void |
stop() |
void |
unregister(java.lang.String group,
Address mbr) |
public GossipClient(IpAddress gossip_host, long expiry)
gossip_host
- The address and port of the host on which the GossipRouter is runningexpiry
- Interval (in msecs) for the refresher taskpublic GossipClient(java.util.Vector gossip_hosts, long expiry)
gossip_hosts
- List of IpAddressesexpiry
- Interval (in msecs) for the refresher taskpublic boolean isRefresherEnabled()
public void setRefresherEnabled(boolean refresher_enabled)
public void stop()
public void destroy()
public void addGossipRouter(IpAddress gossip_host)
public void register(java.lang.String group, Address mbr)
The entry will be registered with all GossipRouters that GossipClient is configured to access
public void unregister(java.lang.String group, Address mbr)
public java.util.List getMembers(java.lang.String group)
group
- The group namepublic static void main(java.lang.String[] args)
Copyright ? 1998-2006 Bela Ban. All Rights Reserved.