|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventManager
A file system's event manager is used to fire entity events. Entities that
want to stall events can increment the entity manager's hold count
(and decrement it again in a finally
block). The hold count is a
thread local variable.
Method Summary | |
---|---|
void |
decrementHoldCount()
Decrement the thread local hold count. |
void |
fireEvent(EntityEvent<?> ev)
Fire an entity event. |
int |
getHoldCount()
Get the current thread's hold count. |
void |
incrementHoldCount()
Increment the thread local hold count for the entity manager. |
boolean |
isEnabled()
Are events enabled for this file system? |
Method Detail |
---|
boolean isEnabled()
true
if events are enabled for this file system.void fireEvent(EntityEvent<?> ev)
0
,
the event is fired right away. If it is > 0
, it is saved and
fired when the hold count decreases to 0
again.
ev
- The event (contains a reference to the entity that sent it).void incrementHoldCount()
0
, events are queued up internally and sent when
the hold count is decremented to 0
again.
decrementHoldCount()
,
getHoldCount()
void decrementHoldCount() throws IllegalStateException
0
, all queued events for the current thread are fired.
IllegalStateException
- If the hold count already is zero.incrementHoldCount()
,
getHoldCount()
int getHoldCount()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |