cz.cuni.amis.pogamut.base3d.worldview.impl
Class SyncLockableBatchAwareWorldView
java.lang.Object
cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView
cz.cuni.amis.pogamut.base.communication.worldview.impl.EventDrivenWorldView
cz.cuni.amis.pogamut.base3d.worldview.impl.VisionWorldView
cz.cuni.amis.pogamut.base3d.worldview.impl.BatchAwareWorldView
cz.cuni.amis.pogamut.base3d.worldview.impl.SyncLockableBatchAwareWorldView
- All Implemented Interfaces:
- ILockableWorldView, IWorldChangeEventInput, IWorldView, IComponent, IVisionWorldView
public abstract class SyncLockableBatchAwareWorldView
- extends BatchAwareWorldView
- implements ILockableWorldView
Method Summary |
boolean |
isInLock()
|
boolean |
isLocked()
Whether the worldview is locked. |
void |
lock()
When the world view is locked - no batches are processes until unlocked. |
void |
notify(IWorldChangeEvent event)
Implements locking logic. |
void |
stop()
Stops the world view. |
void |
unlock()
Unlocks the world view - triggers processing of all events till the last
EndMessage that came between lock() / unlock() calls. |
Methods inherited from class cz.cuni.amis.pogamut.base.communication.worldview.impl.AbstractWorldView |
addEventListener, addObjectListener, addObjectListener, addObjectListener, addObjectListener, addWorldObject, get, get, get, getAll, getAll, getComponentId, getEventBus, getLog, getSingle, isListening, isListening, isListening, isListening, isListening, isListening, isPaused, isRunning, kill, pause, prePause, preStop, removeEventListener, removeListener, removeObjectListener, removeObjectListener, removeObjectListener, removeObjectListener, removeWorldObject, reset, resume, start, toString |
Methods inherited from interface cz.cuni.amis.pogamut.base.communication.worldview.IWorldView |
addEventListener, addObjectListener, addObjectListener, addObjectListener, addObjectListener, get, get, get, getAll, getAll, getEventBus, getSingle, isListening, isListening, isListening, isListening, isListening, isListening, removeEventListener, removeListener, removeObjectListener, removeObjectListener, removeObjectListener, removeObjectListener |
WORLDVIEW_DEPENDENCY
public static final String WORLDVIEW_DEPENDENCY
- See Also:
- Constant Field Values
SyncLockableBatchAwareWorldView
@Inject
public SyncLockableBatchAwareWorldView(ComponentDependencies dependencies,
IComponentBus bus,
IAgentLogger log)
lock
public void lock()
throws cz.cuni.amis.utils.exception.PogamutInterruptedException
- When the world view is locked - no batches are processes until unlocked.
- Specified by:
lock
in interface ILockableWorldView
- Throws:
InterruptedException
cz.cuni.amis.utils.exception.PogamutInterruptedException
unlock
public void unlock()
- Unlocks the world view - triggers processing of all events till the last
EndMessage that came between lock() / unlock() calls.
- Specified by:
unlock
in interface ILockableWorldView
isLocked
public boolean isLocked()
- Description copied from interface:
ILockableWorldView
- Whether the worldview is locked.
- Specified by:
isLocked
in interface ILockableWorldView
- Returns:
isInLock
public boolean isInLock()
notify
public void notify(IWorldChangeEvent event)
- Implements locking logic.
- Specified by:
notify
in interface IWorldChangeEventInput
- Overrides:
notify
in class BatchAwareWorldView
stop
public void stop()
- Description copied from class:
AbstractWorldView
- Stops the world view.
If you override this method, do not forget to call super.stop().
- Overrides:
stop
in class AbstractWorldView
Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.