Class ExecutorCachedTeamSource
- java.lang.Object
-
- net.officefloor.frame.api.team.source.impl.AbstractTeamSource
-
- net.officefloor.frame.impl.spi.team.AbstractExecutorTeamSource
-
- net.officefloor.frame.impl.spi.team.ExecutorCachedTeamSource
-
- All Implemented Interfaces:
TeamSource
public class ExecutorCachedTeamSource extends AbstractExecutorTeamSource
TeamSource
utilising a cachedExecutorService
.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.frame.impl.spi.team.AbstractExecutorTeamSource
AbstractExecutorTeamSource.ExecutorServiceFactory, AbstractExecutorTeamSource.ExecutorTeam
-
Nested classes/interfaces inherited from class net.officefloor.frame.api.team.source.impl.AbstractTeamSource
AbstractTeamSource.SpecificationContext
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_MIN_SIZE
Property name for the minimum size.static java.lang.String
PROPERTY_WAIT_TIME
Property name for the wait time for aJob
before shutting down theThread
.-
Fields inherited from class net.officefloor.frame.impl.spi.team.AbstractExecutorTeamSource
PROPERTY_SHUTDOWN_TIME_IN_SECONDS, PROPERTY_THREAD_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description ExecutorCachedTeamSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AbstractExecutorTeamSource.ExecutorServiceFactory
createExecutorServiceFactory(TeamSourceContext context, java.util.concurrent.ThreadFactory threadFactory)
Obtains the factory to createExecutorService
.-
Methods inherited from class net.officefloor.frame.impl.spi.team.AbstractExecutorTeamSource
createTeam, createTeam, loadSpecification
-
Methods inherited from class net.officefloor.frame.api.team.source.impl.AbstractTeamSource
getSpecification
-
-
-
-
Field Detail
-
PROPERTY_MIN_SIZE
public static final java.lang.String PROPERTY_MIN_SIZE
Property name for the minimum size.- See Also:
- Constant Field Values
-
PROPERTY_WAIT_TIME
public static final java.lang.String PROPERTY_WAIT_TIME
Property name for the wait time for aJob
before shutting down theThread
.- See Also:
- Constant Field Values
-
-
Method Detail
-
createExecutorServiceFactory
protected AbstractExecutorTeamSource.ExecutorServiceFactory createExecutorServiceFactory(TeamSourceContext context, java.util.concurrent.ThreadFactory threadFactory) throws java.lang.Exception
Description copied from class:AbstractExecutorTeamSource
Obtains the factory to createExecutorService
.- Specified by:
createExecutorServiceFactory
in classAbstractExecutorTeamSource
- Parameters:
context
-TeamSourceContext
.threadFactory
-ThreadFactory
to use for the creation of theThread
instances.- Returns:
AbstractExecutorTeamSource.ExecutorServiceFactory
.- Throws:
java.lang.Exception
- If fails to create theAbstractExecutorTeamSource.ExecutorServiceFactory
.
-
-