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>
AServiceSchemeRegistryprovides a mechanism manage a collection ofServiceSchemes together with the ability to search the registry for saidServiceSchemes, either by name or service name.ServiceSchemeRegistrys areIterable, the order of iteration being the order in which theServiceSchemes 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 ServiceSchemefindSchemeBySchemeName(String sSchemeName)Attempts to locate aServiceSchemeregistered with the specifiedScheme.getSchemeName().ServiceSchemefindSchemeByServiceName(String sServiceName)Attempts to locate aServiceSchemeregistered with the specifiedServiceScheme.getServiceName()giving preference to "autostart" schemes.Iterator<ServiceScheme>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, 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:
iteratorin interfaceIterable<ServiceScheme>
-
register
public void register(ServiceScheme scheme)
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
public ServiceScheme findSchemeBySchemeName(String sSchemeName)
Attempts to locate aServiceSchemeregistered with the specifiedScheme.getSchemeName().- Parameters:
sSchemeName- the scheme of theServiceSchemeto find- Returns:
- the registered
ServiceSchemeornullif not registered
-
findSchemeByServiceName
public ServiceScheme findSchemeByServiceName(String sServiceName)
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
-
-