public class ConnectorExecutorImpl extends Object implements ConnectorExecutor
| Constructor and Description |
|---|
ConnectorExecutorImpl(int queueCapacity,
int corePoolSize,
org.bonitasoft.engine.log.technical.TechnicalLoggerService loggerService,
int maximumPoolSize,
long keepAliveTimeSeconds,
org.bonitasoft.engine.sessionaccessor.SessionAccessor sessionAccessor,
SessionService sessionService)
The handling of threads relies on the JVM
The rules to create new thread are:
- If the number of threads is less than the corePoolSize, create a new Thread to run a new task
|
public ConnectorExecutorImpl(int queueCapacity,
int corePoolSize,
org.bonitasoft.engine.log.technical.TechnicalLoggerService loggerService,
int maximumPoolSize,
long keepAliveTimeSeconds,
org.bonitasoft.engine.sessionaccessor.SessionAccessor sessionAccessor,
SessionService sessionService)
queueCapacity - The maximum number of execution of connector to queue for each threadcorePoolSize - the number of threads to keep in the pool, even
if they are idle, unless allowCoreThreadTimeOut is setloggerService - timeout - if the execution of the connector is above this time in milliseconds the execution will failmaximumPoolSize - the maximum number of threads to allow in the
poolkeepAliveTime - when the number of threads is greater than
the core, this is the maximum time that excess idle threads
will wait for new tasks before terminating. (in seconds)public Map<String,Object> execute(SConnector sConnector, Map<String,Object> inputParameters) throws org.bonitasoft.engine.connector.exception.SConnectorException
execute in interface ConnectorExecutororg.bonitasoft.engine.connector.exception.SConnectorExceptionprotected Map<String,Object> getValue(Future<Map<String,Object>> submit) throws InterruptedException, ExecutionException, TimeoutException
public void disconnect(SConnector sConnector) throws org.bonitasoft.engine.connector.exception.SConnectorException
disconnect in interface ConnectorExecutororg.bonitasoft.engine.connector.exception.SConnectorExceptionpublic void start()
throws org.bonitasoft.engine.commons.exceptions.SBonitaException
start in interface org.bonitasoft.engine.commons.ServiceWithLifecycleorg.bonitasoft.engine.commons.exceptions.SBonitaExceptionpublic void stop()
stop in interface org.bonitasoft.engine.commons.ServiceWithLifecycleCopyright © 2014 Bonitasoft S.A.. All Rights Reserved.