Package com.tangosol.coherence.config
Class ServiceSchemeRegistry
- java.lang.Object
-
- com.tangosol.coherence.config.ServiceSchemeRegistry
-
- All Implemented Interfaces:
Iterable<ServiceScheme>
public class ServiceSchemeRegistry extends Object implements Iterable<ServiceScheme>
AServiceSchemeRegistry
provides a mechanism manage a collection ofServiceScheme
s together with the ability to search the registry for saidServiceScheme
s, either by name or service name.ServiceSchemeRegistry
s areIterable
, the order of iteration being the order in which theServiceScheme
s where added to the saidServiceSchemeRegistry
.- Since:
- Coherence 12.1.2
- Author:
- bo 2012.05.02
-
-
Constructor Summary
Constructors Constructor Description ServiceSchemeRegistry()
Constructs aServiceSchemeRegistry
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceScheme
findSchemeBySchemeName(String sSchemeName)
Attempts to locate aServiceScheme
registered with the specifiedScheme.getSchemeName()
.ServiceScheme
findSchemeByServiceName(String sServiceName)
Attempts to locate aServiceScheme
registered with the specifiedServiceScheme.getServiceName()
giving preference to "autostart" schemes.Iterator<ServiceScheme>
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 Detail
-
ServiceSchemeRegistry
public ServiceSchemeRegistry()
Constructs aServiceSchemeRegistry
.
-
-
Method Detail
-
iterator
public Iterator<ServiceScheme> iterator()
- Specified by:
iterator
in interfaceIterable<ServiceScheme>
-
register
public void register(ServiceScheme scheme)
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
public ServiceScheme findSchemeBySchemeName(String sSchemeName)
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
public ServiceScheme findSchemeByServiceName(String sServiceName)
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
-
-