|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectequip.runtime.Object
equip.runtime.ValueBase
equip.data.ItemData
equip.data.EventPattern
An ItemData subclass which represents a process's
interest in a certain kind of event(s).
An instance of the event type itself is the pattern,
using match(). This coniders null strings and valuetype
references to be wildcards, and requires that the pattern
be the same class or a subclass of the matched object.
The different kinds of patterns define different ways in which they are satisfied and/or removed from the system.
An AddEvent with kind ItemEventKind.EQDATA_KIND_PRESENT (or wildcard) will match
items already in existance (as if the Pattern has been in place
before they were created).
Similarly, a DeleteEvent with that kind will cause
callbacks when the pattern is deleted for any matching items
still present in the database.
Inherited from ItemData:
| Field Summary | |
boolean |
deleteItemOnMatch
Whether to delete the matched item (for Add/Delete pseudo-events) after any/each successful match. |
boolean |
deleteOnCheck
flag to remove pattern as soon as first full check complete. |
boolean |
deleteOnMatch
flag to delete pattern if a successful match occurs. |
Event[] |
eventTemplates
Template to be matched by a dataspace event. |
ItemData[] |
itemTemplates
Template to be matched by the item to which an item-linked event relates (add, delete, update, mutate). |
boolean |
local
Is the event pattern for the local database only? |
boolean |
matched
internal flag indicating pattern has been successfully matched. |
| Fields inherited from class equip.data.ItemData |
id, name |
| Constructor Summary | |
EventPattern()
Default no-arg constructor |
|
| Method Summary | |
boolean |
_equals_helper(EventPattern c)
Internal IDL-generated equality test helper |
boolean |
_matches_helper(EventPattern c)
Internal IDL-generated match test helper |
boolean |
equals(java.lang.Object c)
Standard IDL-generated equality test. |
java.lang.String |
getModuleName()
IDL-generated helper routine to get module name (currently unimplemented). |
abstract void |
initAsCompoundEventMonitor(Event[] eventTemplates,
boolean local)
convenience initialisation: version of initAsSimpleEventMonitor(equip.data.Event, boolean) for multiple event templates. |
abstract void |
initAsCompoundItemMonitor(ItemData[] itemTemplates,
boolean local)
convenience initialisation: version of initAsSimpleItemMonitor(equip.data.ItemData, boolean) for multiple item templates. |
abstract void |
initAsSimpleCollect(ItemData itemTemplate,
boolean local)
convenience initialisation: tuplespace collect - all matching items are returned and deleted (out) (NBonly works on local dataspace at present). |
abstract void |
initAsSimpleCopyCollect(ItemData itemTemplate,
boolean local)
convenience initialisation: tuplespace copy-collect - all matching items are returned (read) (NBonly works on local dataspace at present). |
abstract void |
initAsSimpleEventMonitor(Event eventTemplate,
boolean local)
convenience initialisation: ongoing monitor for simple events, rather than data items. |
abstract void |
initAsSimpleItemMonitor(ItemData itemTemplate,
boolean local)
convenience initialisation: like an ongoing copy-collect: makes an event pattern for Add, update and delete events on the matching itemTemplate (works globally but asynchrnously). |
abstract void |
initAsSimpleOut(ItemData itemTemplate,
boolean local)
convenience initialisation: tuplespace out - single matching item, which is atomically removed from the data space (NBonly works on local dataspace at present). |
abstract void |
initAsSimpleRead(ItemData itemTemplate,
boolean local)
convenience initialisation: tuplespace read - single matching item (NBonly works on local dataspace at present). |
abstract void |
initAsSimpleReadp(ItemData itemTemplate,
boolean local)
convenience initialisation: tuplespace readp (predicate) - single matching item, or null if no item is present at the moment (read waits for an item) (NBonly works on local dataspace at present). |
boolean |
matches(java.lang.Object c)
Standard IDL-generated template match test. |
void |
readObject(ObjectInputStream in)
Internal IDL-generated serialisation helper. |
void |
writeObject(ObjectOutputStream out)
Internal IDL-generated serialisation helper. |
| Methods inherited from class equip.data.ItemData |
_equals_helper, _matches_helper |
| Methods inherited from class equip.runtime.ValueBase |
_equals_helper, _matches_helper, clone |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public ItemData[] itemTemplates
itemTemplates AND the eventTemplates must match. (no itemTemplates -> any item,
no eventTemplates -> any event).
public Event[] eventTemplates
itemTemplates must also match.
public boolean deleteOnCheck
public boolean deleteOnMatch
public boolean matched
public boolean deleteItemOnMatch
public boolean local
| Constructor Detail |
public EventPattern()
| Method Detail |
public abstract void initAsSimpleRead(ItemData itemTemplate,
boolean local)
public abstract void initAsSimpleReadp(ItemData itemTemplate,
boolean local)
public abstract void initAsSimpleOut(ItemData itemTemplate,
boolean local)
public abstract void initAsSimpleCopyCollect(ItemData itemTemplate,
boolean local)
public abstract void initAsSimpleCollect(ItemData itemTemplate,
boolean local)
public abstract void initAsSimpleItemMonitor(ItemData itemTemplate,
boolean local)
Using the ItemEventKind.EQDATA_KIND_PRESENT kind (or
wildcard) this also returns items existing when the patterns
is first added to a session. It will then return
add/update/delete events matching until the pattern is
removed.
This is the main method used for inter-dataspace replication, since a non-local item monitor will be copied to other connected dataspace replicas and cause matching items to be copied to and kept up to date in the originating dataspace.
public abstract void initAsCompoundItemMonitor(ItemData[] itemTemplates,
boolean local)
initAsSimpleItemMonitor(equip.data.ItemData, boolean) for multiple item templates.
public abstract void initAsSimpleEventMonitor(Event eventTemplate,
boolean local)
Used for stateless event distribution, e.g. comparable to Elvin.
public abstract void initAsCompoundEventMonitor(Event[] eventTemplates,
boolean local)
initAsSimpleEventMonitor(equip.data.Event, boolean) for multiple event templates.
public java.lang.String getModuleName()
getModuleName in class ItemDatapublic boolean equals(java.lang.Object c)
equals in class ItemDatac - The object to be compared against this.
cpublic boolean _equals_helper(EventPattern c)
public boolean matches(java.lang.Object c)
matches in class ItemDatac - The object to be checked against this template.
this (as a template) matches the argumentpublic boolean _matches_helper(EventPattern c)
public void writeObject(ObjectOutputStream out)
throws java.io.IOException
ObjectInputStream and ObjectOutputStream only.
writeObject in class ItemDatajava.io.IOException
public void readObject(ObjectInputStream in)
throws java.io.IOException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException
ObjectInputStream and ObjectOutputStream only.
readObject in class ItemDatajava.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||