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.StringgetTeamName()Obtains the name of theTeamto be created from theTeamSource.intgetTeamSize()Obtains the size of theTeam.intgetTeamSize(int defaultSize)Allows obtaining the size of theTeam, without forcing it to be configured.java.util.concurrent.ThreadFactorygetThreadFactory()Obtains theThreadFactoryfor 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
Teamto be created from theTeamSource.This enables naming the
Threadinstances for theTeamto be specific to theTeam.- Returns:
- Name of the
Teamto be created from theTeamSource.
-
getTeamSize
int getTeamSize()
Obtains the size of the
Team.Typically this is the maximum number of
Threadinstances for theTeam. However, for someTeamimplementations it may not be used (e.g.PassiveTeamSource).It is provided to allow the
Executiveto have some control overTeamsizes.- Returns:
Teamsize.
-
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
ThreadFactoryfor theTeam.It is encouraged for
Teamimplementations to use this in creatingThreadinstances. This is to enable performance improvements byOfficeFloor, such asThreadLocalManagedObjectPoolsolutions to reduce pool locking overheads.- Returns:
ThreadFactoryfor theTeam.
-
-