Package org.ikasan.spec.systemevent
Interface SystemEventDao<EVENT>
-
public interface SystemEventDao<EVENT>Data access interface for persistence ofSystemFlowEventDao- Author:
- Ikasan Development Team
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteExpired()Deletes all expired system eventsorg.ikasan.spec.search.PagedSearchResult<EVENT>find(int pageNo, int pageSize, java.lang.String orderBy, boolean orderAscending, java.lang.String subject, java.lang.String action, java.util.Date timestampFrom, java.util.Date timestampTo, java.lang.String actor)Performs a paged search forSystemFlowEvents restricting by criteria fields as suppliedjava.util.List<EVENT>getHarvestableRecords(int housekeepingBatchSize)Get (housekeepingBatchSize) harvestable records.java.lang.IntegergetHousekeepingBatchSize()java.lang.BooleangetOrderHarvestQuery()Is harvest query ordered?booleanhousekeepablesExist()Checks if there are housekeepable items in existance, ie expired WiretapFlowEventsbooleanisBatchHousekeepDelete()java.util.List<EVENT>list(java.util.List<java.lang.String> subjects, java.lang.String actor, java.util.Date timestampFrom, java.util.Date timestampTo)This method returns a list of Events based on subjects and actor within a certain date range.voidsave(EVENT event)Persists a new system eventvoidsetBatchHousekeepDelete(boolean batchHousekeepDelete)voidsetHousekeepingBatchSize(java.lang.Integer housekeepingBatchSize)voidsetHousekeepQuery(java.lang.String housekeepQuery)voidsetOrderHarvestQuery(java.lang.Boolean orderHarvestQuery)Set flag to determine if harvest query should be ordered.voidsetTransactionBatchSize(java.lang.Integer transactionBatchSize)voidupdateAsHarvested(java.util.List<EVENT> events)Update entity as being harvested.
-
-
-
Method Detail
-
save
void save(EVENT event)
Persists a new system event- Parameters:
event-
-
find
org.ikasan.spec.search.PagedSearchResult<EVENT> find(int pageNo, int pageSize, java.lang.String orderBy, boolean orderAscending, java.lang.String subject, java.lang.String action, java.util.Date timestampFrom, java.util.Date timestampTo, java.lang.String actor)
Performs a paged search forSystemFlowEvents restricting by criteria fields as supplied- Parameters:
pageNo- - page control field - page no of results to returnpageSize- - page control field - size of pageorderBy- - page control - field to order byorderAscending- - page control field - true/false results in ascending order with respect to orderBy fieldsubject- - criteria field - filter for exact match on subjectaction- - criteria field - filter for exact match on actiontimestampFrom- - criteria field - filter for events with timestamp greater than this valuetimestampTo- - criteria field - filter for events with timestamp less than this valueactor- - criteria field - filter for exact match on actor- Returns:
- PagedSearchResult
- page friendly search result subset
-
list
java.util.List<EVENT> list(java.util.List<java.lang.String> subjects, java.lang.String actor, java.util.Date timestampFrom, java.util.Date timestampTo)
This method returns a list of Events based on subjects and actor within a certain date range.- Parameters:
subjects-actor-timestampFrom-timestampTo-- Returns:
-
deleteExpired
void deleteExpired()
Deletes all expired system events
-
isBatchHousekeepDelete
boolean isBatchHousekeepDelete()
-
setBatchHousekeepDelete
void setBatchHousekeepDelete(boolean batchHousekeepDelete)
-
getHousekeepingBatchSize
java.lang.Integer getHousekeepingBatchSize()
-
setHousekeepingBatchSize
void setHousekeepingBatchSize(java.lang.Integer housekeepingBatchSize)
-
housekeepablesExist
boolean housekeepablesExist()
Checks if there are housekeepable items in existance, ie expired WiretapFlowEvents- Returns:
- true if there is at least 1 expired WiretapFlowEvent
-
setTransactionBatchSize
void setTransactionBatchSize(java.lang.Integer transactionBatchSize)
- Parameters:
transactionBatchSize- the transactionBatchSize to set
-
setHousekeepQuery
void setHousekeepQuery(java.lang.String housekeepQuery)
-
getHarvestableRecords
java.util.List<EVENT> getHarvestableRecords(int housekeepingBatchSize)
Get (housekeepingBatchSize) harvestable records.- Parameters:
housekeepingBatchSize-- Returns:
-
updateAsHarvested
void updateAsHarvested(java.util.List<EVENT> events)
Update entity as being harvested.- Parameters:
events-
-
getOrderHarvestQuery
java.lang.Boolean getOrderHarvestQuery()
Is harvest query ordered?- Returns:
- true if ordered otherwise false.
-
setOrderHarvestQuery
void setOrderHarvestQuery(java.lang.Boolean orderHarvestQuery)
Set flag to determine if harvest query should be ordered.- Parameters:
orderHarvestQuery-
-
-