Interface HistoryService
public interface HistoryService
-
Method Summary
Modifier and TypeMethodDescriptionintgetEarliestHistoryEntryVersionGtEqDate(long structureId, long timestamp) Returns theHistoryEntry.getVersion()of the earliest history entry which timestamp >= If there is no such history entry, returns 0.intgetEntryCount(long structureId) intgetEntryCountGtEqDate(long structureId, long timestamp) getForestVersion(long structureId, int version) getHistoryEntries(long structureId, int versionFrom, int versionTo) Returns history entries for the specified structure that have versions in the specified range.voidgetHistoryEntries(long structureId, int versionFrom, int versionTo, HistoryConsumer consumer) getHistoryEntriesWithoutChanges(long structureId, int versionFrom, int versionTo) Lightweight version ofgetHistoryEntries(long, int, int)which does not fetch changes, works much faster.intgetLatestHistoryEntryVersion(long structureId) Returns theversionof the latest history entry for the specified structure.voidqueryActivity(HistoryQuery hq, int limit, int changesLimit, LimitedHistoryConsumer consumer) 'Streams' results of history query to consumer while limiting the total amount of changes that are loaded per entry.voidqueryActivity(HistoryQuery hq, int limit, HistoryConsumer consumer) 'Streams' results of history query to consumer.
-
Method Details
-
queryActivity
'Streams' results of history query to consumer.- Parameters:
hq- query.limit- max number ofHistoryEntrythat will be loaded.consumer- receivesHistoryEntryresults.
-
queryActivity
'Streams' results of history query to consumer while limiting the total amount of changes that are loaded per entry.- Parameters:
hq- query.limit- max number ofHistoryEntrythat will be loaded.changesLimit- max number ofHistoryEntry.Changeloaded perHistoryEntry.consumer- receivesHistoryEntryand total number ofHistoryEntry.Changeassociated with it - which won't have been completely loaded into the entry if the number exceedschangesLimit
-
getHistoryEntries
-
getHistoryEntries
Returns history entries for the specified structure that have versions in the specified range. The range is half-opened on the left side.- Parameters:
versionFrom- minimum version, exclusiveversionTo- maximum version, inclusive
-
getHistoryEntriesWithoutChanges
List<HistoryEntry> getHistoryEntriesWithoutChanges(long structureId, int versionFrom, int versionTo) Lightweight version ofgetHistoryEntries(long, int, int)which does not fetch changes, works much faster. -
getLatestHistoryEntryVersion
int getLatestHistoryEntryVersion(long structureId) Returns theversionof the latest history entry for the specified structure. If there are no history entries for the specified structure, returns 0. -
getEarliestHistoryEntryVersionGtEqDate
int getEarliestHistoryEntryVersionGtEqDate(long structureId, long timestamp) Returns theHistoryEntry.getVersion()of the earliest history entry which timestamp >= If there is no such history entry, returns 0. -
getEntryCount
int getEntryCount(long structureId) -
getEntryCountGtEqDate
int getEntryCountGtEqDate(long structureId, long timestamp) -
getForestVersion
- Parameters:
structureId- structure IDversion- version- Returns:
- a
ForestVersioncontaining the full forest and the history entry for the given version - Throws:
StructureException- if the structure does not exist or is inaccessible; if there is no such version (including intermittent versions for which there is no history entry)
-