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 ServiceScheme
s together with the ability to search the registry for
said ServiceScheme
s, either by name or service name.
ServiceSchemeRegistry
s are Iterable
, the order of iteration
being the order in which the ServiceScheme
s where added to the said
ServiceSchemeRegistry
.
- Since:
- Coherence 12.1.2
- Author:
- bo 2012.05.02
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindSchemeBySchemeName
(String sSchemeName) Attempts to locate aServiceScheme
registered with the specifiedScheme.getSchemeName()
.findSchemeByServiceName
(String sServiceName) Attempts to locate aServiceScheme
registered with the specifiedServiceScheme.getServiceName()
giving preference to "autostart" schemes.iterator()
void
register
(ServiceScheme scheme) Attempts to register the specifiedServiceScheme
.int
size()
Determines the number ofScheme
s registered with theServiceSchemeRegistry
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ServiceSchemeRegistry
public ServiceSchemeRegistry()Constructs aServiceSchemeRegistry
.
-
-
Method Details
-
iterator
- Specified by:
iterator
in interfaceIterable<ServiceScheme>
-
register
Attempts to register the specifiedServiceScheme
.- Parameters:
scheme
- theServiceScheme
to register- Throws:
IllegalArgumentException
- if aServiceScheme
with the same scheme and/or service name has already been registered
-
findSchemeBySchemeName
Attempts to locate aServiceScheme
registered with the specifiedScheme.getSchemeName()
.- Parameters:
sSchemeName
- the scheme of theServiceScheme
to find- Returns:
- the registered
ServiceScheme
ornull
if not registered
-
findSchemeByServiceName
Attempts to locate aServiceScheme
registered with the specifiedServiceScheme.getServiceName()
giving preference to "autostart" schemes.- Parameters:
sServiceName
- the service name ofServiceScheme
to find- Returns:
- the registered
ServiceScheme
ornull
if not registered
-
size
public int size()Determines the number ofScheme
s registered with theServiceSchemeRegistry
.- Returns:
- the number of
Scheme
s
-