Interface EventStoreApi

  • All Known Implementing Classes:
    MockUnclusteredEventStore

    public interface EventStoreApi
    Store, retrieve and acknowledge events.
    • Method Detail

      • getEvents

        EventQuery getEvents​(EventQuery eventQuery)
                      throws AttivioException
        Executes the event query. If EventQuery.getMaxFetchSize() is > 0, multiple calls might be needed to get all the events. In that case, getEvents() should be called until EventQuery.isDone() returns true. Note that the last call might return an empty list. An exception is thrown if getEvents() is called after EventQuery.isDone().
         EventQuery eventQuery = new EventQuery();
         eventQuery.setSubsystem(subsystem);
         eventQuery.setStart(start);
         eventQuery.setEnd(end);
         eventQuery.setGetAlreadyAcknowledged(getAcknoledeged);
         eventQuery.setMaxFetchSize(maxFetchSize);
         while (!eventQuery.isDone()) {
           eventQuery = eventStore().getEvents(eventQuery);
           // Do something with eventQuery.getEventList()
         }
         
        Parameters:
        eventQuery - the caller must pass the EventQuery object returned from the previous call
        Returns:
        the query object to be used in the next getEvents call
        Throws:
        AttivioException
      • acknowledgeEvent

        void acknowledgeEvent​(long eventId,
                              java.lang.String user,
                              java.lang.String reason)
                       throws AttivioException
        Parameters:
        eventId -
        user -
        reason -
        Throws:
        AttivioException