public class GossipClient
extends java.lang.Object
Requires JDK >= 1.3 due to the use of Timer.
Modifier and Type | Field | Description |
---|---|---|
protected org.apache.commons.logging.Log |
log |
Constructor | Description |
---|---|
GossipClient(java.util.Vector<IpAddress> gossip_hosts,
long expiry) |
Creates the GossipClient
|
GossipClient(java.util.Vector<IpAddress> gossip_hosts,
long expiry,
int sock_conn_timeout) |
|
GossipClient(IpAddress gossip_host,
long expiry) |
Creates the GossipClient
|
Modifier and Type | Method | Description |
---|---|---|
void |
addGossipRouter(IpAddress gossip_host) |
Adds a GossipRouter to be accessed.
|
void |
destroy() |
|
java.util.List<Address> |
getMembers(java.lang.String group) |
Returns all members of a given group
|
long |
getRefreshInterval() |
|
int |
getSocketConnectionTimeout() |
|
int |
getSocketReadTimeout() |
|
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 |
setRefreshInterval(long refresh_interval) |
|
void |
setSocketConnectionTimeout(int sock_conn_timeout) |
|
void |
setSocketReadTimeout(int sock_read_timeout) |
|
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<IpAddress> gossip_hosts, long expiry)
gossip_hosts
- List of IpAddressesexpiry
- Interval (in msecs) for the refresher taskpublic GossipClient(java.util.Vector<IpAddress> gossip_hosts, long expiry, int sock_conn_timeout)
public boolean isRefresherEnabled()
public void setRefresherEnabled(boolean refresher_enabled)
public int getSocketConnectionTimeout()
public void setSocketConnectionTimeout(int sock_conn_timeout)
public int getSocketReadTimeout()
public void setSocketReadTimeout(int sock_read_timeout)
public long getRefreshInterval()
public void setRefreshInterval(long refresh_interval)
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<Address> getMembers(java.lang.String group)
group
- The group namepublic static void main(java.lang.String[] args)
Copyright ? 1998-2008 Bela Ban. All Rights Reserved.