Interface TeamSourceContext

All Superinterfaces:
SourceContext, SourceProperties
All Known Subinterfaces:
ExecutiveContext
All Known Implementing Classes:
ExecutiveContextImpl, TeamSourceContextWrapper

public interface TeamSourceContext extends SourceContext
Context for the TeamSource.
Author:
Daniel Sagenschneider
  • Method Details

    • getTeamName

      String getTeamName()

      Obtains the name of the Team to be created from the TeamSource.

      This enables naming the Thread instances for the Team to be specific to the Team.

      Returns:
      Name of the Team to be created from the TeamSource.
    • getTeamSize

      int getTeamSize()

      Obtains the size of the Team.

      Typically this is the maximum number of Thread instances for the Team. However, for some Team implementations it may not be used (e.g. PassiveTeamSource).

      It is provided to allow the Executive to have some control over Team sizes.

      Returns:
      Team size.
    • getTeamSize

      int getTeamSize(int defaultSize)
      Allows obtaining the size of the Team, without forcing it to be configured.
      Parameters:
      defaultSize - Default size of the Team, if no size configured.
      Returns:
      Team size.
    • getThreadFactory

      ThreadFactory getThreadFactory()

      Obtains the ThreadFactory for the Team.

      It is encouraged for Team implementations to use this in creating Thread instances. This is to enable performance improvements by OfficeFloor, such as ThreadLocal ManagedObjectPool solutions to reduce pool locking overheads.

      Returns:
      ThreadFactory for the Team.