de.lmu.ifi.dbs.elki.database.datastore
Class DataStoreEvent

java.lang.Object
  extended by java.util.EventObject
      extended by de.lmu.ifi.dbs.elki.database.datastore.DataStoreEvent
All Implemented Interfaces:
Serializable

public class DataStoreEvent
extends EventObject

Encapsulates information describing changes, i.e. updates, insertions, and / or deletions in a DataStore, and used to notify all subscribed DataStoreListener of the change.

See Also:
DataStore, DataStoreListener, Serialized Form

Nested Class Summary
static class DataStoreEvent.Type
          Available event types.
 
Field Summary
private  Map<DataStoreEvent.Type,DBIDs> objects
          The objects that were changed in the DataStore mapped by the type of change.
private static long serialVersionUID
          Serialization ID since Java EventObjects are expected to be serializable.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DataStoreEvent(Object source, Map<DataStoreEvent.Type,DBIDs> objects)
          Used to create an event when objects have been updated in, inserted into, and / or removed from the specified DataStore.
 
Method Summary
 Map<DataStoreEvent.Type,DBIDs> getObjects()
          Returns the objects that have been changed and the type of change.
 Set<DataStoreEvent.Type> getTypes()
          Returns the types of change this event consists of.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serialization ID since Java EventObjects are expected to be serializable.

See Also:
Constant Field Values

objects

private final Map<DataStoreEvent.Type,DBIDs> objects
The objects that were changed in the DataStore mapped by the type of change.

Constructor Detail

DataStoreEvent

public DataStoreEvent(Object source,
                      Map<DataStoreEvent.Type,DBIDs> objects)
Used to create an event when objects have been updated in, inserted into, and / or removed from the specified DataStore.

Parameters:
source - the object responsible for generating the event
objects - the objects that have been changed mapped by the type of change
See Also:
DataStoreEvent.Type.INSERT, DataStoreEvent.Type.DELETE, DataStoreEvent.Type.UPDATE
Method Detail

getTypes

public Set<DataStoreEvent.Type> getTypes()
Returns the types of change this event consists of.

Returns:
the types of this event
See Also:
DataStoreEvent.Type.INSERT, DataStoreEvent.Type.DELETE, DataStoreEvent.Type.UPDATE

getObjects

public Map<DataStoreEvent.Type,DBIDs> getObjects()
Returns the objects that have been changed and the type of change.

Returns:
the objects that have been changed

Release 0.4.0 (2011-09-20_1324)