|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.auxiliary.lateral.socket.tcp.discovery.UDPDiscoveryService
public class UDPDiscoveryService
This service creates a listener that can create lateral caches and add them to the no wait list.
It also creates a sender that periodically broadcasts its availability.
The sender also broadcasts a request for other caches to broadcast their addresses.
| Constructor Summary | |
|---|---|
UDPDiscoveryService(java.lang.String discoveryAddress,
int discoveryPort,
int servicePort,
ICompositeCacheManager cacheMgr)
|
|
| Method Summary | |
|---|---|
protected void |
addNoWait(LateralCacheNoWait noWait)
This adds nowaits to a facde for the region name. |
boolean |
addNoWaitFacade(LateralCacheNoWaitFacade facade,
java.lang.String cacheName)
Adds a nowait facade under this cachename. |
protected java.util.ArrayList |
getCacheNames()
Get all the cache names we have facades for. |
protected java.lang.String |
getDiscoveryAddress()
|
protected int |
getDiscoveryPort()
|
protected int |
getServicePort()
|
ITCPLateralCacheAttributes |
getTcpLateralCacheAttributes()
|
protected void |
serviceRequestBroadcast()
Send a passive broadcast in response to a request broadcast. |
protected void |
setDiscoveryAddress(java.lang.String discoveryAddress)
|
protected void |
setDiscoveryPort(int discoveryPort)
|
protected void |
setServicePort(int servicePort)
|
void |
setTcpLateralCacheAttributes(ITCPLateralCacheAttributes tCPLateralCacheAttributes)
|
void |
shutdown()
Tells the observer that the observable has received a shutdown command. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UDPDiscoveryService(java.lang.String discoveryAddress,
int discoveryPort,
int servicePort,
ICompositeCacheManager cacheMgr)
discoveryAddress - address to multicast todiscoveryPort - port to multicast toservicePort - the port this service runs on, the service we are telling
other aboutcacheMgr - | Method Detail |
|---|
public boolean addNoWaitFacade(LateralCacheNoWaitFacade facade,
java.lang.String cacheName)
When a broadcast is received from the UDP Discovery receiver, for each cacheName in the message, the add no wait will be called here. To add a no wait, the facade is looked up for this cache name.
facade - cacheName -
protected void addNoWait(LateralCacheNoWait noWait)
noWait - protected void serviceRequestBroadcast()
protected java.util.ArrayList getCacheNames()
public void shutdown()
IShutdownObserver
shutdown in interface IShutdownObserverprotected void setDiscoveryAddress(java.lang.String discoveryAddress)
discoveryAddress - The discoveryAddress to set.protected java.lang.String getDiscoveryAddress()
protected void setDiscoveryPort(int discoveryPort)
discoveryPort - The discoveryPort to set.protected int getDiscoveryPort()
protected void setServicePort(int servicePort)
servicePort - The servicePort to set.protected int getServicePort()
public void setTcpLateralCacheAttributes(ITCPLateralCacheAttributes tCPLateralCacheAttributes)
tCPLateralCacheAttributes - The tCPLateralCacheAttributes to set.public ITCPLateralCacheAttributes getTcpLateralCacheAttributes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||