com.bea.wlevs.eventstore
Interface EventStore


public interface EventStore

A channel for accessing a collection of persistent events that are to be treated as a unit for purposes of event capture and query.


Method Summary
 void capture(java.util.List events)
          Appends the specified events to this event store, with no transactional guarantee.
 void capture(java.util.List events, EventStoreTransaction transaction)
          Appends the specified events to this event store as part of the specified transaction, or not part of any transaction if transaction is null.
 EventStoreTransaction createTransaction()
          Creates a transaction that may be used to treat a series of capture or query operations atomically.
 EventStoreCursor query(EventStoreQuery query)
          Retrieves events from this event store according to the specified provider-specific query.
 EventStoreCursor query(EventStoreQuery query, EventStoreTransaction transaction)
          Retrieves events from this event store according to the specified provider-specific query.
 EventStoreCursor query(java.lang.String query)
          Retrieves events from this event store according to the specified provider-independent query.
 EventStoreCursor query(java.lang.String query, EventStoreTransaction transaction)
          Retrieves events from this event store according to the specified provider-independent query.
 

Method Detail

createTransaction

public EventStoreTransaction createTransaction()
                                        throws EventStoreException
Creates a transaction that may be used to treat a series of capture or query operations atomically.

Throws:
EventStoreException - if this event store does not support transactions, or if some other error occurs.

capture

public void capture(java.util.List events,
                    EventStoreTransaction transaction)
             throws EventStoreException
Appends the specified events to this event store as part of the specified transaction, or not part of any transaction if transaction is null.

Parameters:
events - the events to add to this event store.
transaction - the transaction within which events are to be added, or null if these events are to be added with no transactional guarantee.

capture

public void capture(java.util.List events)
             throws EventStoreException
Appends the specified events to this event store, with no transactional guarantee. Equivalent to calling capture with a null second argument.

Parameters:
events - the events to add to this event store.

query

public EventStoreCursor query(java.lang.String query,
                              EventStoreTransaction transaction)
                       throws EventStoreException
Retrieves events from this event store according to the specified provider-independent query. This form is used when the client wishes to use the simple EPL-like query language that most providers support.

Parameters:
query - the specification of the events to retrieve, in the EPL-like query language
transaction - the transaction within which events are to be queried, or null if the query is not part of any transaction.
Returns:
a cursor that iterates over the matching events.

query

public EventStoreCursor query(java.lang.String query)
                       throws EventStoreException
Retrieves events from this event store according to the specified provider-independent query. This form is used when the client wishes to use the simple EPL-like query language that most providers support. Equivalent to calling query with a null second argument.

Parameters:
query - the specification of the events to retrieve, in the EPL-like query language
Returns:
a cursor that iterates over the matching events.

query

public EventStoreCursor query(EventStoreQuery query,
                              EventStoreTransaction transaction)
                       throws EventStoreException
Retrieves events from this event store according to the specified provider-specific query. This form is used when the client needs to make use of provider-specific query features, using a subclass of EventStoreQuery made available by the provider in use.

Parameters:
query - the specification of the events to retrieve
transaction - the transaction within which events are to be queried, or null if the query is not part of any transaction.
Returns:
a cursor that iterates over the matching events.

query

public EventStoreCursor query(EventStoreQuery query)
                       throws EventStoreException
Retrieves events from this event store according to the specified provider-specific query. This form is used when the client needs to make use of provider-specific query features, using a subclass of EventStoreQuery made available by the provider in use. Equivalent to calling query with a null second argument.

Parameters:
query - the specification of the events to retrieve
Returns:
a cursor that iterates over the matching events.


Copyright © 2007 BEA Systems All Rights Reserved.