Class ProcessorRegistry
- java.lang.Object
-
- com.tangosol.coherence.rest.util.processor.ProcessorRegistry
-
public class ProcessorRegistry extends Object
A registry forProcessorFactory
instances.- Author:
- vp 2011.07.08
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROCESSOR_REQUEST_REGEX
Regex pattern that defines the processor request syntax.
-
Constructor Summary
Constructors Constructor Description ProcessorRegistry()
Construct an ProcessorRegistry.ProcessorRegistry(Collection<ProcessorConfig> colConfig)
Construct an ProcessorRegistry that includes built-in processors in addition to the specified processors.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvocableMap.EntryProcessor
getProcessor(String sRequest)
Returns a configured processor.void
register(String sName, ProcessorFactory factory)
Registers a processor factory with the given name.void
register(String sName, Class clz)
Registers processor factory with the given name.void
register(Collection<ProcessorConfig> colConfig)
Register a collection of processors.
-
-
-
Field Detail
-
PROCESSOR_REQUEST_REGEX
public static final String PROCESSOR_REQUEST_REGEX
Regex pattern that defines the processor request syntax.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ProcessorRegistry
public ProcessorRegistry()
Construct an ProcessorRegistry.By default the following built-in processors will be registered:
- increment
- multiply
- post-increment
- post-multiply
-
ProcessorRegistry
public ProcessorRegistry(Collection<ProcessorConfig> colConfig)
Construct an ProcessorRegistry that includes built-in processors in addition to the specified processors.- Parameters:
colConfig
- processor configurations
-
-
Method Detail
-
getProcessor
public InvocableMap.EntryProcessor getProcessor(String sRequest)
Returns a configured processor.- Parameters:
sRequest
- the processor request- Returns:
- processor
-
register
public void register(String sName, ProcessorFactory factory)
Registers a processor factory with the given name.- Parameters:
sName
- the processor namefactory
- the processor factory
-
register
public void register(String sName, Class clz)
Registers processor factory with the given name.A
DefaultProcessorFactory
will be used if theclz
parameter is a class that implements InvocableMap.EntryProcessor.- Parameters:
sName
- the processor nameclz
- the processor or processor factory class
-
register
public void register(Collection<ProcessorConfig> colConfig)
Register a collection of processors.- Parameters:
colConfig
- the processor configurations
-
-