|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.tivoli.zce.persistence.PHandler
Class with static methods, used to manage persistence of events.
It uses a combination of event
flags:
Event.counter
,
Event.isPersisted
and
com.tivoli.zce.engine.Event#currentEvent Event.currentEvent
to figure out when to persist an event or to remove it from the persistent store.
Constructor Summary | |
---|---|
PHandler()
|
Method Summary | |
---|---|
static void |
addEvent(Event e)
Method to add an event to the persistent store if it is enabled. |
static void |
clean()
If persistence is enabled, remove all elements in the persistent store. |
static void |
init(com.tivoli.zce.persistence.IPersistentStore ps)
initialize the persistence using the persistence store plugin |
static void |
removeEvent_termAction(Event e)
This method uses PHandler.removeEvent call and should be called from the terminalAction or an action that discard some events. |
static void |
removeEvent_termAction(EventList elist)
This method uses PHandler.removeEvent call and should be called from the terminalAction or an action that discards some events. |
static void |
removeEvent_termRule(Event e)
Method called in the terminal rule, the last operation during a processEvent call. |
static void |
removeEvent(Event e)
Method to mark an event as no longer in use and to remove it from the persistent store if persistence is enabled. |
static void |
setOff()
Set the persistence mechanism as disabled if it was enabled, do nothing otherwise. |
static void |
setOn()
Set the persistence mechanism as enabled if it was disabled, do nothing otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PHandler()
Method Detail |
public static void addEvent(Event e) throws java.lang.Exception
e.counter
transition from
0 -> 1 and persists the event
java.lang.Exception
public static void removeEvent_termRule(Event e) throws java.lang.Exception
e
- the event
to eventually remove
java.lang.Exception
- an exception
can be thrown in case of persistence
error ( IO operation error ).public static void removeEvent_termAction(EventList elist) throws java.lang.Exception
elist
- the list of events to discard from the persistence
java.lang.Exception
- @see com.tivoli.zce.persistence.PHandler#removeEvent_termRule(Event e)public static void removeEvent_termAction(Event e) throws java.lang.Exception
Event
.
e
-
java.lang.Exception
public static void removeEvent(Event e) throws java.lang.Exception
java.lang.Exception
public static void setOn()
public static void setOff()
public static void init(com.tivoli.zce.persistence.IPersistentStore ps)
ps
- the persistence store plugin to used for storing persistence data.public static void clean()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |