PooledSplitJoinService
instead; since performance
characteristics are unpredictable in constrained environments@Deprecated @ComponentProfile(summary="Split a message and then execute the associated services on the split items, aggregating the split messages afterwards", tag="service,splitjoin", since="3.7.1") @ConfigDeprecated(removalVersion="4.0.0", message="Use pooled-split-join-service instead; since performance characteristics are unpredictable in constrained environments", groups=java.lang.Deprecated.class) public class PoolingSplitJoinService extends SplitJoinService
SplitJoinService
that uses a underlying thread and object pool to execute the
service on each split message.
This service splits a message according to the configured MessageSplitter
implementation,
executes the configured Service
and subsequently joins all the messages
back using the configured MessageAggregator
implementation
This differs from SplitJoinService
in that a pool of Service
instances is maintained and re-used for each message; so the high cost of initialisation for the
service, is not incurred (more than the max number of threads specified) as much.
In the adapter configuration file this class is aliased as pooling-split-join-service which is the preferred alternative to the fully qualified classname when building your configuration.
log
Constructor and Description |
---|
PoolingSplitJoinService()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<java.util.concurrent.Callable<AdaptrisMessage>> |
buildTasks(ServiceExceptionHandler handler,
java.util.List<AdaptrisMessage> msgs)
Deprecated.
|
void |
closeService()
Deprecated.
|
protected java.util.concurrent.ExecutorService |
createExecutor()
Deprecated.
|
java.lang.Integer |
getMaxThreads()
Deprecated.
|
java.lang.Boolean |
getWarmStart()
Deprecated.
|
void |
initService()
Deprecated.
|
void |
prepare()
Deprecated.
Prepare for initialisation.
|
void |
setMaxThreads(java.lang.Integer size)
Deprecated.
Set the max number of threads to handle the execution of the split messages.
|
void |
setWarmStart(java.lang.Boolean b)
Deprecated.
Specify if the underlying object pool should be warmed up on
start() . |
void |
start()
Deprecated.
Starts the component.
|
PoolingSplitJoinService |
withMaxThreads(java.lang.Integer max)
Deprecated.
|
PoolingSplitJoinService |
withWarmStart(java.lang.Boolean b)
Deprecated.
|
doService, getAggregator, getSendEvents, getService, getSplitter, getTimeout, registerEventHandler, sendEvents, sendEvents, setAggregator, setExceptionStrategy, setSendEvents, setService, setSplitter, setTimeout, wrappedServices
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
continueOnFailure, isBranching, setUniqueId
createName, createQualifier, isTrackingEndpoint
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
getUniqueId
close, init, stop
public void prepare() throws CoreException
ComponentLifecycleExtension
prepare
in interface ComponentLifecycleExtension
prepare
in class SplitJoinService
CoreException
public void initService() throws CoreException
initService
in class SplitJoinService
CoreException
public void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer
, calling start
will begin message delivery.
start
in interface ComponentLifecycle
start
in class ServiceImp
CoreException
- wrapping any underlying Exception
spublic void closeService()
closeService
in class SplitJoinService
protected java.util.List<java.util.concurrent.Callable<AdaptrisMessage>> buildTasks(ServiceExceptionHandler handler, java.util.List<AdaptrisMessage> msgs) throws java.lang.Exception
buildTasks
in class SplitJoinService
java.lang.Exception
protected java.util.concurrent.ExecutorService createExecutor()
createExecutor
in class SplitJoinService
public java.lang.Integer getMaxThreads()
public void setMaxThreads(java.lang.Integer size)
size
- the max number of threads, defaults to 10 if not specified.public PoolingSplitJoinService withMaxThreads(java.lang.Integer max)
public java.lang.Boolean getWarmStart()
public void setWarmStart(java.lang.Boolean b)
start()
.b
- true or false (default false if not specified).public PoolingSplitJoinService withWarmStart(java.lang.Boolean b)