Package com.tangosol.coherence.config
Class ServiceSchemeRegistry
java.lang.Object
com.tangosol.coherence.config.ServiceSchemeRegistry
- All Implemented Interfaces:
Iterable<ServiceScheme>
A
ServiceSchemeRegistry provides a mechanism manage a collection
of ServiceSchemes together with the ability to search the registry for
said ServiceSchemes, either by name or service name.
ServiceSchemeRegistrys are Iterable, the order of iteration
being the order in which the ServiceSchemes where added to the said
ServiceSchemeRegistry.
- Since:
- Coherence 12.1.2
- Author:
- bo 2012.05.02
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindSchemeBySchemeName(String sSchemeName) Attempts to locate aServiceSchemeregistered with the specifiedScheme.getSchemeName().findSchemeByServiceName(String sServiceName) Attempts to locate aServiceSchemeregistered with the specifiedServiceScheme.getServiceName()giving preference to "autostart" schemes.iterator()voidregister(ServiceScheme scheme) Attempts to register the specifiedServiceScheme.intsize()Determines the number ofSchemes registered with theServiceSchemeRegistry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ServiceSchemeRegistry
public ServiceSchemeRegistry()Constructs aServiceSchemeRegistry.
-
-
Method Details
-
iterator
- Specified by:
iteratorin interfaceIterable<ServiceScheme>
-
register
Attempts to register the specifiedServiceScheme.- Parameters:
scheme- theServiceSchemeto register- Throws:
IllegalArgumentException- if aServiceSchemewith the same scheme and/or service name has already been registered
-
findSchemeBySchemeName
Attempts to locate aServiceSchemeregistered with the specifiedScheme.getSchemeName().- Parameters:
sSchemeName- the scheme of theServiceSchemeto find- Returns:
- the registered
ServiceSchemeornullif not registered
-
findSchemeByServiceName
Attempts to locate aServiceSchemeregistered with the specifiedServiceScheme.getServiceName()giving preference to "autostart" schemes.- Parameters:
sServiceName- the service name ofServiceSchemeto find- Returns:
- the registered
ServiceSchemeornullif not registered
-
size
public int size()Determines the number ofSchemes registered with theServiceSchemeRegistry.- Returns:
- the number of
Schemes
-