Class LateralTCPDiscoveryListener
- All Implemented Interfaces:
- IDiscoveryListener
We can have one listener per region, or one shared by all regions.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedLateralTCPDiscoveryListener(String factoryName, ICompositeCacheManager cacheManager) Deprecated.Use constructor with four parametersprotectedLateralTCPDiscoveryListener(String factoryName, CompositeCacheManager cacheManager, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) This plugs into the udp discovery system.
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddDiscoveredService(DiscoveredService service) Creates the lateral cache if needed.protected <K,V> boolean addNoWait(LateralCacheNoWait<K, V> noWait) When a broadcast is received from the UDP Discovery receiver, for each cacheName in the message, the add no wait will be called here.protected <K,V> boolean addNoWait(LateralCacheNoWait<K, V> noWait, LateralCacheNoWaitFacade<K, V> facade) When a broadcast is received from the UDP Discovery receiver, for each cacheName in the message, the add no wait will be called here.booleanaddNoWaitFacade(String cacheName, LateralCacheNoWaitFacade<?, ?> facade) Adds a nowait facade under this cachename.<K,V> boolean containsNoWait(String cacheName, LateralCacheNoWait<K, V> noWait) Allows us to see if the facade is present and if it has the no wait.booleancontainsNoWaitFacade(String cacheName) Allows us to see if the facade is present.voidremoveDiscoveredService(DiscoveredService service) Removes the lateral cache.protected <K,V> boolean removeNoWait(LateralCacheNoWait<K, V> noWait) Look up the facade for the name.protected <K,V> boolean removeNoWait(LateralCacheNoWaitFacade<K, V> facade, String cacheName, String tcpServer) Remove the item from the no wait list.
- 
Constructor Details- 
LateralTCPDiscoveryListener@Deprecated protected LateralTCPDiscoveryListener(String factoryName, ICompositeCacheManager cacheManager) Deprecated.Use constructor with four parametersThis plugs into the udp discovery system. It will receive add and remove events.- Parameters:
- factoryName- the name of the related cache factory
- cacheManager- the global cache manager
 
- 
LateralTCPDiscoveryListenerprotected LateralTCPDiscoveryListener(String factoryName, CompositeCacheManager cacheManager, ICacheEventLogger cacheEventLogger, IElementSerializer elementSerializer) This plugs into the udp discovery system. It will receive add and remove events.- Parameters:
- factoryName- the name of the related cache factory
- cacheManager- the global cache manager
- cacheEventLogger- Reference to the cache event logger for auxiliary cache creation
- elementSerializer- Reference to the cache element serializer for auxiliary cache creation
- Since:
- 3.1
 
 
- 
- 
Method Details- 
addNoWaitFacadeAdds a nowait facade under this cachename. If one already existed, it will be overridden.This adds nowaits to a facade for the region name. If the region has no facade, then it is not configured to use the lateral cache, and no facade will be created. - Parameters:
- cacheName- - the region name
- facade- - facade (for region) => multiple lateral clients.
- Returns:
- true if the facade was not already registered.
 
- 
containsNoWaitFacadeAllows us to see if the facade is present.- Parameters:
- cacheName- - facades are for a region
- Returns:
- do we contain the no wait. true if so
 
- 
containsNoWaitAllows us to see if the facade is present and if it has the no wait.- Parameters:
- cacheName- - facades are for a region
- noWait- - is this no wait in the facade
- Returns:
- do we contain the no wait. true if so
 
- 
addNoWaitWhen 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.Each region has a facade. The facade contains a list of end points--the other tcp lateral services. - Parameters:
- noWait-
- Returns:
- true if we found the no wait and added it. False if the no wait was not present or if we already had it.
 
- 
addNoWaitprotected <K,V> boolean addNoWait(LateralCacheNoWait<K, V> noWait, LateralCacheNoWaitFacade<K, V> facade) When a broadcast is received from the UDP Discovery receiver, for each cacheName in the message, the add no wait will be called here.- Parameters:
- noWait- the no wait
- facade- the related facade
- Returns:
- true if we found the no wait and added it. False if the no wait was not present or if we already had it.
- Since:
- 3.1
 
- 
removeNoWaitLook up the facade for the name. If it doesn't exist, then the region is not configured for use with the lateral cache. If it is present, remove the item from the no wait list.- Parameters:
- noWait-
- Returns:
- true if we found the no wait and removed it. False if the no wait was not present.
 
- 
removeNoWaitprotected <K,V> boolean removeNoWait(LateralCacheNoWaitFacade<K, V> facade, String cacheName, String tcpServer) Remove the item from the no wait list.- Parameters:
- facade-
- cacheName-
- tcpServer-
- Returns:
- true if we found the no wait and removed it. False if the no wait was not present.
- Since:
- 3.1
 
- 
addDiscoveredServiceCreates the lateral cache if needed.We could go to the composite cache manager and get the cache for the region. This would force a full configuration of the region. One advantage of this would be that the creation of the later would go through the factory, which would add the item to the no wait list. But we don't want to do this. This would force this client to have all the regions as the other. This might not be desired. We don't want to send or receive for a region here that is either not used or not configured to use the lateral. Right now, I'm afraid that the region will get puts if another instance has the region configured to use the lateral and our address is configured. This might be a bug, but it shouldn't happen with discovery. - Specified by:
- addDiscoveredServicein interface- IDiscoveryListener
- Parameters:
- service-
 
- 
removeDiscoveredServiceRemoves the lateral cache.We need to tell the manager that this instance is bad, so it will reconnect the sender if it comes back. - Specified by:
- removeDiscoveredServicein interface- IDiscoveryListener
- Parameters:
- service-
 
 
-