hmi.elckerlyc.scheduler
Class BMLBlockManager
java.lang.Object
hmi.elckerlyc.scheduler.BMLBlockManager
- All Implemented Interfaces:
- BMLFeedbackListener, BMLListener
public class BMLBlockManager
- extends Object
- implements BMLFeedbackListener
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
finishedBMLBlocks
private final ConcurrentHashMap<String,BMLBlock> finishedBMLBlocks
BMLBlocks
private final ConcurrentHashMap<String,BMLBlock> BMLBlocks
logger
private final org.slf4j.Logger logger
behaviorProgress
private final com.google.common.collect.SetMultimap<BMLBlockManager.BehaviorKey,BMLSyncPointProgressFeedback> behaviorProgress
BMLBlockManager
public BMLBlockManager()
addBMLBlock
public void addBMLBlock(BMLBlock bbm)
removeBMLBlock
public void removeBMLBlock(String bmlId)
setBMLBlockState
public void setBMLBlockState(String bmlId,
PlanUnitState state)
startBlock
public void startBlock(String bmlId)
activateOnStartBlocks
public void activateOnStartBlocks(String bmlId,
double time)
- Activate all onStart blocks of behavior with id bmlId
- Parameters:
bmlId -
getBMLBlockState
public PlanUnitState getBMLBlockState(String bmlId)
- Get block state of BML block with id bmlId
- Returns:
- state of the block, PlanUnitState.Done if the block is not (or no longer) in the list
of blocks managed by the blockmanager
getBMLBlocks
public Set<String> getBMLBlocks()
updateBlocks
void updateBlocks()
updateBlocks
void updateBlocks(double time)
clear
public void clear()
activate
public void activate(String bmlId,
double time)
performanceStop
public void performanceStop(BMLPerformanceStopFeedback psf)
- Specified by:
performanceStop in interface BMLFeedbackListener
reset
public void reset()
performanceStart
public void performanceStart(BMLPerformanceStartFeedback psf)
- Specified by:
performanceStart in interface BMLFeedbackListener
syncProgress
public void syncProgress(BMLSyncPointProgressFeedback spp)
- Specified by:
syncProgress in interface BMLFeedbackListener
getSyncProgress
public com.google.common.collect.ImmutableSet<BMLSyncPointProgressFeedback> getSyncProgress(String bmlId,
String behaviorId)
- Get a Immutable copy of the set of progress messages send for a certain behavior
getSyncsPassed
public com.google.common.collect.ImmutableSet<String> getSyncsPassed(String bmlId,
String behaviorId)
- Get the ImmutableSet of syncs that are finished for a certain behavior