Interface TeamSourceContext
-
- All Superinterfaces:
SourceContext
,SourceProperties
- All Known Subinterfaces:
ExecutiveContext
- All Known Implementing Classes:
ExecutiveContextImpl
,TeamSourceContextWrapper
public interface TeamSourceContext extends SourceContext
Context for theTeamSource
.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getTeamName()
Obtains the name of theTeam
to be created from theTeamSource
.int
getTeamSize()
Obtains the size of theTeam
.int
getTeamSize(int defaultSize)
Allows obtaining the size of theTeam
, without forcing it to be configured.java.util.concurrent.ThreadFactory
getThreadFactory()
Obtains theThreadFactory
for theTeam
.-
Methods inherited from interface net.officefloor.frame.api.source.SourceContext
getClassLoader, getClock, getLogger, getName, getOptionalResource, getProfiles, getResource, isLoadingType, loadClass, loadOptionalClass, loadOptionalService, loadOptionalServices, loadService, loadService, loadServices
-
Methods inherited from interface net.officefloor.frame.api.source.SourceProperties
getProperties, getProperty, getProperty, getPropertyNames
-
-
-
-
Method Detail
-
getTeamName
java.lang.String getTeamName()
Obtains the name of the
Team
to be created from theTeamSource
.This enables naming the
Thread
instances for theTeam
to be specific to theTeam
.- Returns:
- Name of the
Team
to be created from theTeamSource
.
-
getTeamSize
int getTeamSize()
Obtains the size of the
Team
.Typically this is the maximum number of
Thread
instances for theTeam
. However, for someTeam
implementations it may not be used (e.g.PassiveTeamSource
).It is provided to allow the
Executive
to have some control overTeam
sizes.- Returns:
Team
size.
-
getTeamSize
int getTeamSize(int defaultSize)
Allows obtaining the size of theTeam
, without forcing it to be configured.
-
getThreadFactory
java.util.concurrent.ThreadFactory getThreadFactory()
Obtains the
ThreadFactory
for theTeam
.It is encouraged for
Team
implementations to use this in creatingThread
instances. This is to enable performance improvements byOfficeFloor
, such asThreadLocal
ManagedObjectPool
solutions to reduce pool locking overheads.- Returns:
ThreadFactory
for theTeam
.
-
-