|
||||||||||
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.
Field Summary | |
---|---|
protected ICacheEventLogger |
cacheEventLogger
The event logger. |
protected IElementSerializer |
elementSerializer
The serializer. |
Constructor Summary | |
---|---|
UDPDiscoveryService(java.lang.String discoveryAddress,
int discoveryPort,
int servicePort,
ICompositeCacheManager cacheMgr,
ICacheEventLogger cacheEventLogger,
IElementSerializer elementSerializer)
|
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()
Shuts down the receiver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ICacheEventLogger cacheEventLogger
protected IElementSerializer elementSerializer
Constructor Detail |
---|
public UDPDiscoveryService(java.lang.String discoveryAddress, int discoveryPort, int servicePort, ICompositeCacheManager cacheMgr, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer)
discoveryAddress
- address to multicast todiscoveryPort
- port to multicast toservicePort
- the port this service runs on, the service we are telling other aboutcacheMgr
- cacheEventLogger
- elementSerializer
- 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()
shutdown
in interface IShutdownObserver
protected 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 |