Interface HistoryService


public interface HistoryService
  • Method Details

    • queryActivity

      void queryActivity(HistoryQuery hq, int limit, HistoryConsumer consumer)
      'Streams' results of history query to consumer.
      Parameters:
      hq - query.
      limit - max number of HistoryEntry that will be loaded.
      consumer - receives HistoryEntry results.
    • queryActivity

      void queryActivity(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.
      Parameters:
      hq - query.
      limit - max number of HistoryEntry that will be loaded.
      changesLimit - max number of HistoryEntry.Change loaded per HistoryEntry.
      consumer - receives HistoryEntry and total number of HistoryEntry.Change associated with it - which won't have been completely loaded into the entry if the number exceeds changesLimit
    • getHistoryEntries

      void getHistoryEntries(long structureId, int versionFrom, int versionTo, HistoryConsumer consumer)
    • getHistoryEntries

      List<HistoryEntry> getHistoryEntries(long structureId, int versionFrom, int versionTo)
      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, exclusive
      versionTo - maximum version, inclusive
    • getHistoryEntriesWithoutChanges

      List<HistoryEntry> getHistoryEntriesWithoutChanges(long structureId, int versionFrom, int versionTo)
      Lightweight version of getHistoryEntries(long, int, int) which does not fetch changes, works much faster.
    • getLatestHistoryEntryVersion

      int getLatestHistoryEntryVersion(long structureId)
      Returns the version of 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 the HistoryEntry.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

      ForestVersion getForestVersion(long structureId, int version) throws StructureException
      Parameters:
      structureId - structure ID
      version - version
      Returns:
      a ForestVersion containing 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)