|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.resources.client.LookupCachePool
public class LookupCachePool
The LookupCachePool class provides the support to get an existing LookupCache from a pool of created LookupCache instances. Criteria for determining LookupCache matching is based on ServiceTemplate matching
| Nested Class Summary | |
|---|---|
class |
LookupCachePool.SharedLookupCache
The SharedLookupCache implements a LookupCache and delegates all method invocations to it's LookupDiscoveryManager, and maintains a reference counter for how many clients are sharing the instance. |
| Method Summary | |
|---|---|
static LookupCachePool |
getInstance()
Get the singleton instance of the LookupCachePool |
LookupCache |
getLookupCache(DiscoveryManagement dMgr,
ServiceTemplate template)
This method will return an instance of LookupCache based on matching the DiscoveryManagement instance and ServiceTemplate provided as criteria. |
LookupCache |
getLookupCache(String sharedName,
String[] groups,
LookupLocator[] locators,
ServiceTemplate template)
This method will return an instance of LookupCache based on matching the shared name, shared discovery name, groups, locators and ServiceTemplate provided as criteria. |
void |
setConfiguration(Configuration conf)
Set the Configuration property |
void |
setServiceBeanContainer(ServiceBeanContainer container)
Set the ServiceBeanContainer |
void |
terminate()
For all ServiceDiscoveryManager instances this utility has created, terminate them and set the singleton instance to null; |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static LookupCachePool getInstance()
public void setServiceBeanContainer(ServiceBeanContainer container)
ServiceBeanContainer
container - The public void setConfiguration(Configuration conf)
conf - The Configuration to use when creating
ServiceDiscoveryManager instances
public LookupCache getLookupCache(DiscoveryManagement dMgr,
ServiceTemplate template)
throws IOException,
ConfigurationException
If the LookupCache can not be found due to not being able to match discovery criteria to a known ServiceDiscoveryManager instance a new ServiceDiscoveryManager instance will be created, then a LookupCache instance created and returned.
If a ServiceDiscoveryManager can be matched, but not a LookupCache, a new LookupCache will be created using the matched ServiceDiscoveryManager
dMgr - A DiscoveryManager instance created by the DiscoveryManagementPooltemplate - ServiceTemplate to match
IOException - If discovery management cannot be created
ConfigurationException - If the Jini configuration cannot be used
public LookupCache getLookupCache(String sharedName,
String[] groups,
LookupLocator[] locators,
ServiceTemplate template)
throws IOException,
ConfigurationException
If a LookupCache can not be found due to not being able to match discovery criteria, a new ServiceDiscoveryManager instance will be created using the provided discovery criteria, and a LookupCache instance created and returned.
If a ServiceDiscoveryManager can be matched, but not a LookupCache, a new LookupCache will be created using the matched ServiceDiscoveryManager
sharedName - The name the LookupCache instances are shared acrossgroups - An array of String objects indicating the Jini Lookup
Service groups to discoverlocators - An array of LookupLocator objects indicating specific
Jini Lookup Service instances to discovertemplate - ServiceTemplate to match
IOException - If discovery mangement cannot be created
ConfigurationException - If the Jini configuration cannot be usedpublic void terminate()
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||