|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.fhg.igd.event.Event de.fhg.igd.atlas.core.StorageDBEvent
This class represents a database event.
Database events are triggered when the state of the corresponding
database has changed. Each event carries a StorageDBImmutableEntry
representing the
entry within the database which has been added, changed or deleted
as well as the identifier of the action which led to the new state.
Field Summary | |
static int |
ALL
|
private StorageDBImmutableEntry |
dbEntry_
The imutable database entry corresponding to the StorageDBEntry managed by the
database, which triggered this event. |
static int |
DELETE
|
static int |
INIT
|
private int |
mask_
The bit mask of those parameters this event refers to. |
private static String[] |
op_id
The tokens which specify event parameters. |
private static int[] |
op_mask
Each event parameter corresponds to a bit mask which is used for quick implication testing. |
static int |
REFRESH
|
static int |
TIMEOUT
|
static int |
UPDATE
|
Fields inherited from class de.fhg.igd.event.Event |
millis |
Constructor Summary | |
StorageDBEvent(StorageDBImmutableEntry dbEntry,
String action)
Creates an instance. |
Method Summary | |
boolean |
equals(Object o)
Tests if this object is equal to the given one which is true iff their classes match, their
masks match and their agent names match. |
StorageDBImmutableEntry |
getDBEntry()
Returns the entry of the database which is subject of this event. |
int |
getMask()
Returns the mask of this object. |
boolean |
implies(Object o)
Checks whether this object implies the given one. |
boolean |
isDelete()
Return true if this event's
DELETE flag is set. |
boolean |
isInit()
Return true if this event's
INIT flag is set. |
boolean |
isRefresh()
Return true if this event's
REFRESH flag is set. |
boolean |
isTimeout()
Return true if this event's
TIMEOUT flag is set. |
boolean |
isUpdate()
Return true if this event's
UPDATE flag is set. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int INIT
public static final int UPDATE
public static final int DELETE
public static final int REFRESH
public static final int TIMEOUT
public static final int ALL
private static final String[] op_id
private static final int[] op_mask
private transient StorageDBImmutableEntry dbEntry_
StorageDBEntry
managed by the
database, which triggered this event.
private int mask_
Constructor Detail |
public StorageDBEvent(StorageDBImmutableEntry dbEntry, String action)
dbEntry
represents the entry of the database
which is subject of this event. action
is a
comma seperated list of strings representing the actions
which led to the new state of the database (see
op_id
).
dbEntry
- The entry which has been added, changed
or deleted and thereby led to a new state of the database.action
- The event's actions.Method Detail |
public boolean implies(Object o)
o
- The object which is tested for implication.
true
if this event implies the
given one.public boolean equals(Object o)
true
iff their classes match, their
masks match and their agent names match.
o
- The object which is tested for equality.public int getMask()
public StorageDBImmutableEntry getDBEntry()
public String toString()
public boolean isInit()
true
if this event's
INIT flag is set.
true
if this event signals INIT.public boolean isUpdate()
true
if this event's
UPDATE flag is set.
true
if this event signals UPDATE.public boolean isDelete()
true
if this event's
DELETE flag is set.
true
if this event signals DELETE.public boolean isRefresh()
true
if this event's
REFRESH flag is set.
true
if this event signals REFRESH.public boolean isTimeout()
true
if this event's
TIMEOUT flag is set.
true
if this event signals TIMEOUT.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |