|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Local interface for the data store enterprise bean.
This interface defines the methods that are used to store and access events in the data store. A default data store is provided that implements this interface. An application must implement this interface to provide its own data store.
Method Summary | |
---|---|
void |
createEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event)
Creates a new event in the data store. |
void |
createEvents(EventCreationRequest[] events)
Creates an array of new event in the data store. |
boolean |
eventExists(java.lang.String eventSelector)
Determines if events exist that belong to the specified event selector. |
ComponentMetaData |
getMetaData()
Returns the component metadata of the data store enterprise bean |
void |
purgeEvents(java.lang.String[] globalInstanceIds)
Deletes events from the data store. |
int |
purgeEvents(java.lang.String eventSelector,
int transactionSize)
Deletes events from the data store in a single call. |
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent |
queryEventByGlobalInstanceId(java.lang.String globalInstanceId)
Retrieves an event by the globalInstanceId . |
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] |
queryEvents(java.lang.String eventSelector,
boolean ascendingOrder)
Retrieves events that belong to the specified event selector. |
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] |
queryEvents(java.lang.String eventSelector,
boolean ascendingOrder,
int maximumNumber)
Retrieves events that belong to the specified event selector. |
org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] |
queryEventsByAssociation(java.lang.String associationType,
java.lang.String globalInstanceId)
Retrieve events that are related to specific global instance ID. |
java.lang.String[] |
queryGlobalInstanceIds(java.lang.String eventSelector,
int maximumNumber)
Retrieves the global instance IDs of events that belong to the specified event selector. |
EventUpdateResponse[] |
updateEvents(EventUpdateRequest[] eventUpdateRequests)
Updates events that are persisted in the data store. |
Methods inherited from interface javax.ejb.EJBLocalObject |
---|
getEJBLocalHome, getPrimaryKey, isIdentical, remove |
Method Detail |
public ComponentMetaData getMetaData() throws DataStoreException
DataStoreException
- If the data store fails to perform the requested action.public void createEvent(org.eclipse.hyades.logging.events.cbe.CommonBaseEvent event) throws DuplicateGlobalInstanceIdException, DataStoreException
It is recommended that the call be configured for REQUIRES transaction.
event
- The event to add to the data store.
DuplicateGlobalInstanceIdException
- If an event already exists in the data store that
contains the same global instance ID as the passed event.
DataStoreException
- If the data store fails to perform the requested action.public void createEvents(EventCreationRequest[] events) throws DuplicateGlobalInstanceIdException, DataStoreException
It is recommended that the call be configured for REQUIRES transaction.
events
- The array of events to add to the data store.
DuplicateGlobalInstanceIdException
- If an event already exists in the data store that
contains the same global instance ID as the passed event.
DataStoreException
- If the data store fails to perform the requested action.public boolean eventExists(java.lang.String eventSelector) throws DataStoreException
It is recommended that the call be configured for REQUIRES transaction.
eventSelector
- The XPath representation of the event selector. This value cannot be
null
.
true
if an event exists that matches the event selector.
false
otherwise.
DataStoreException
- If the data store fails to perform the requested action.public void purgeEvents(java.lang.String[] globalInstanceIds) throws DataStoreException
It is recommended that the call be configured for REQUIRESNEW transaction.
globalInstanceIds
- An array of global instance IDs of the events that are to be purged
from the data store.
DataStoreException
- If the data store fails to perform the requested action.public int purgeEvents(java.lang.String eventSelector, int transactionSize) throws DataStoreException
It is recommended that the call be configured for REQUIRESNEW transaction.
eventSelector
- The XPath representation of the event selector. This value cannot be
null
.transactionSize
- The number of events to delete in a single database transaction.
DataStoreException
- If the data store fails to perform the requested action.public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent queryEventByGlobalInstanceId(java.lang.String globalInstanceId) throws DataStoreException
globalInstanceId
.
It is recommended that the call be configured for REQUIRES transaction.
globalInstanceId
- The global instance ID of the event that is to be returned. This
value cannot be null
.
null
if an event that contains the specified
global instance ID does not exist.
DataStoreException
- If the data store fails to perform the requested action.public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEvents(java.lang.String eventSelector, boolean ascendingOrder) throws DataStoreException
It is recommended that the call be configured for REQUIRES transaction.
eventSelector
- The XPath representation of the event selector. This value cannot be
null
.ascendingOrder
- The order (ascending or descending) in which events are arranged
according to the creation time of the event.
DataStoreException
- If the data store fails to perform the requested action.public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEvents(java.lang.String eventSelector, boolean ascendingOrder, int maximumNumber) throws DataStoreException
It is recommended that the call be configured for REQUIRES transaction.
eventSelector
- The XPath representation of the event selector. This value cannot be
null
.ascendingOrder
- The order (ascending or descending) in which events are arranged
according to the creation time of the event.maximumNumber
- The maximum number of events to be returned from the event query.
DataStoreException
- If the data store fails to perform the requested action.public org.eclipse.hyades.logging.events.cbe.CommonBaseEvent[] queryEventsByAssociation(java.lang.String associationType, java.lang.String globalInstanceId) throws DataStoreException
It is recommended that the call be configured for REQUIRES transaction.
associationType
- The type of the association. This value cannot be null
.globalInstanceId
- The global instance ID of the event that other events are associated
with. This value cannot be null
.
DataStoreException
- If the data store fails to perform the requested action.public java.lang.String[] queryGlobalInstanceIds(java.lang.String eventSelector, int maximumNumber) throws DataStoreException
It is recommended that the call be configured for REQUIRES transaction.
eventSelector
- The XPath representation of the event selector. This value cannot be
null
.maximumNumber
- The maximum number of global instance IDs to be returned from the
query.
DataStoreException
- If the data store fails to perform the requested action.public EventUpdateResponse[] updateEvents(EventUpdateRequest[] eventUpdateRequests) throws DataStoreException
It is recommended that the call be configure for REQUIRES transaction.
eventUpdateRequests
- An array of event update requests. There will be one update
request per event.
EventDoesNotExistException
- If any of the request specify an event that does not
exist in the data store.
DataStoreException
- If the data store fails to perform the requested action.
SeverityAlreadySetException
- If one of the change requests tries to modify the value
of severity. It is only valid to set an unset severity.
ExtendedDataElementUpdateException
- If the parent extended data element does not
exist
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |