public class ConstellationConfiguration
extends java.lang.Object
ConstellationConfiguration
represents some capabilities for running activities
. These
capabilities could represent a single core, a multiple-core processor, some specialized hardware, or an entire cluster. It is
up to the application how these configurations represent the hardware.
An executor that corresponds to a specific ConstellationConfiguration
is a member of a StealPool
, and can
steal activities from another StealPool
. These steal pools are to be provided to the constructor of the
ConstellationConfiguration
.
Also, three (possibly different) steal strategies, represented by StealStrategy
are to be provided:
Constructor and Description |
---|
ConstellationConfiguration(AbstractContext context)
Constructs a
ConstellationConfiguration with the specified parameters. |
ConstellationConfiguration(AbstractContext context,
StealPool belongsTo,
StealPool stealsFrom,
StealStrategy localStealStrategy,
StealStrategy constellationStealStrategy,
StealStrategy remoteStealStrategy)
Constructs a
ConstellationConfiguration with the specified parameters. |
ConstellationConfiguration(AbstractContext context,
StealStrategy stealStrategy)
Constructs a
ConstellationConfiguration with the specified parameters. |
ConstellationConfiguration(AbstractContext context,
StealStrategy localStealStrategy,
StealStrategy remoteStealStrategy)
Constructs a
ConstellationConfiguration with the specified parameters. |
ConstellationConfiguration(AbstractContext context,
StealStrategy localStealStrategy,
StealStrategy constellationStealStrategy,
StealStrategy remoteStealStrategy)
Constructs a
ConstellationConfiguration with the specified parameters. |
Modifier and Type | Method and Description |
---|---|
StealPool |
getBelongsToPool()
Returns the pool to which executors of this
ConstellationConfiguration belong. |
StealStrategy |
getConstellationStealStrategy()
Returns the constellation steal strategy of this
ConstellationConfiguration . |
AbstractContext |
getContext()
Returns the context of this
ConstellationConfiguration . |
StealStrategy |
getLocalStealStrategy()
Returns the local steal strategy of this
ConstellationConfiguration . |
StealStrategy |
getRemoteStealStrategy()
Returns the remote steal strategy of this
ConstellationConfiguration . |
StealPool |
getStealsFrom()
Returns the pool from which executors of this
ConstellationConfiguration can steal. |
void |
setBelongsToPool(StealPool myPool) |
void |
setConstellationStealStrategy(StealStrategy constellationStealStrategy) |
void |
setContext(AbstractContext context) |
void |
setLocalStealStrategy(StealStrategy localStealStrategy) |
void |
setRemoteStealStrategy(StealStrategy remoteStealStrategy) |
void |
setStealsFrom(StealPool stealsFrom) |
public ConstellationConfiguration(AbstractContext context, StealPool belongsTo, StealPool stealsFrom, StealStrategy localStealStrategy, StealStrategy constellationStealStrategy, StealStrategy remoteStealStrategy)
ConstellationConfiguration
with the specified parameters. Executors with this configuration will
behave as described by the parameter section below.belongsTo
- steal pool that these executors will belong to.stealsFrom
- steal pool that these executors will steal from.context
- context of these executors, to be used in finding matching activitieslocalStealStrategy
- steal strategy for local stealsconstellationStealStrategy
- steal strategy for steals within this constellation, from other executors.remoteStealStrategy
- steal strategy for stealing from other constellation instances.java.lang.IllegalArgumentException
- when any of the specified parameters is null.public ConstellationConfiguration(AbstractContext context, StealStrategy localStealStrategy, StealStrategy constellationStealStrategy, StealStrategy remoteStealStrategy)
ConstellationConfiguration
with the specified parameters. Executors with this configuration will
behave as described by the parameter section below. This version of the constructor uses StealPool.WORLD
for both
steal pools.context
- context of these executors, to be used in finding matching activitieslocalStealStrategy
- steal strategy for local stealsconstellationStealStrategy
- steal strategy for steals within this constellation, from other executors.remoteStealStrategy
- steal strategy for stealing from other constellation instances.java.lang.IllegalArgumentException
- when any of the specified parameters is null.public ConstellationConfiguration(AbstractContext context, StealStrategy stealStrategy)
ConstellationConfiguration
with the specified parameters. Executors with this configuration will
behave as described by the parameter section below. This version of the constructor uses StealPool.WORLD
for both
steal pools.context
- context of these executors, to be used in finding matching activitiesstealStrategy
- steal strategy for all stealsjava.lang.IllegalArgumentException
- when any of the specified parameters is null.public ConstellationConfiguration(AbstractContext context, StealStrategy localStealStrategy, StealStrategy remoteStealStrategy)
ConstellationConfiguration
with the specified parameters. Executors with this configuration will
behave as described by the parameter section below. This version of the constructor uses StealPool.WORLD
for both
steal pools.context
- context of these executors, to be used in finding matching activitieslocalStealStrategy
- steal strategy for local stealsremoteStealStrategy
- steal strategy for stealing from other constellation instances or other executors.java.lang.IllegalArgumentException
- when any of the specified parameters is null.public ConstellationConfiguration(AbstractContext context)
ConstellationConfiguration
with the specified parameters. Executors with this configuration will
behave as described by the parameter section below. This version of the constructor uses StealPool.WORLD
for both
steal pools, and StealStrategy.SMALLEST
for the steal strategies.context
- context of these executors, to be used in finding matching activitiesjava.lang.IllegalArgumentException
- when any of the specified parameters is null.public AbstractContext getContext()
ConstellationConfiguration
.public void setContext(AbstractContext context)
public StealStrategy getLocalStealStrategy()
ConstellationConfiguration
.public void setLocalStealStrategy(StealStrategy localStealStrategy)
public StealStrategy getConstellationStealStrategy()
ConstellationConfiguration
.public void setConstellationStealStrategy(StealStrategy constellationStealStrategy)
public StealStrategy getRemoteStealStrategy()
ConstellationConfiguration
.public void setRemoteStealStrategy(StealStrategy remoteStealStrategy)
public StealPool getBelongsToPool()
ConstellationConfiguration
belong.public void setBelongsToPool(StealPool myPool)
public StealPool getStealsFrom()
ConstellationConfiguration
can steal.public void setStealsFrom(StealPool stealsFrom)