|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jcs.utils.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(UDPDiscoveryAttributes attributes,
ICacheEventLogger cacheEventLogger)
|
Method Summary | |
---|---|
boolean |
addDiscoveryListener(IDiscoveryListener listener)
Adds a listener. |
protected void |
addOrUpdateService(DiscoveredService discoveredService)
Add a service to the list. |
void |
addParticipatingCacheName(String cacheName)
Adds a region to the list that is participating in discovery. |
void |
finalize()
Call shutdown to be safe. |
protected ArrayList |
getCacheNames()
Get all the cache names we have facades for. |
Set |
getCopyOfDiscoveryListeners()
|
Set |
getDiscoveredServices()
|
UDPDiscoveryAttributes |
getUdpDiscoveryAttributes()
|
void |
removeDiscoveredService(DiscoveredService service)
Removes the discovered service from the list and calls the discovery listener. |
boolean |
removeDiscoveryListener(IDiscoveryListener listener)
Removes a listener. |
protected void |
serviceRequestBroadcast()
Send a passive broadcast in response to a request broadcast. |
void |
setDiscoveredServices(Set discoveredServices)
|
void |
setUdpDiscoveryAttributes(UDPDiscoveryAttributes attr)
|
void |
shutdown()
Shuts down the receiver. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UDPDiscoveryService(UDPDiscoveryAttributes attributes, ICacheEventLogger cacheEventLogger)
attributes
- cacheEventLogger
- Method Detail |
---|
protected void serviceRequestBroadcast()
public void addParticipatingCacheName(String cacheName)
cacheName
- public void removeDiscoveredService(DiscoveredService service)
service
- protected void addOrUpdateService(DiscoveredService discoveredService)
discoveredService
- discovered serviceprotected ArrayList getCacheNames()
public void setUdpDiscoveryAttributes(UDPDiscoveryAttributes attr)
attr
- The UDPDiscoveryAttributes to set.public UDPDiscoveryAttributes getUdpDiscoveryAttributes()
public void shutdown()
shutdown
in interface IShutdownObserver
public void finalize() throws Throwable
finalize
in class Object
Throwable
- on errorpublic void setDiscoveredServices(Set discoveredServices)
discoveredServices
- The discoveredServices to set.public Set getDiscoveredServices()
public Set getCopyOfDiscoveryListeners()
public boolean addDiscoveryListener(IDiscoveryListener listener)
listener
-
public boolean removeDiscoveryListener(IDiscoveryListener listener)
listener
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |