org.qi4j.library.eventsourcing.application.source.memory

## Class MemoryApplicationEventStoreService.MemoryStoreMixin

- java.lang.Object
- - org.qi4j.library.eventsourcing.application.source.AbstractApplicationEventStoreMixin
  - - org.qi4j.library.eventsourcing.application.source.memory.MemoryApplicationEventStoreService.MemoryStoreMixin

- All Implemented Interfaces:
    ApplicationEventSource, ApplicationEventStore, ApplicationEventStoreActivation, ApplicationEventStream
  Enclosing interface:
    MemoryApplicationEventStoreService

      public abstract static class MemoryApplicationEventStoreService.MemoryStoreMixin
      extends AbstractApplicationEventStoreMixin
      implements ApplicationEventSource, ApplicationEventStoreActivation

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.qi4j.library.eventsourcing.application.source.ApplicationEventStoreActivation

      `ApplicationEventStoreActivation.Activator`

  - ### Field Summary

    - ### Fields inherited from class org.qi4j.library.eventsourcing.application.source.AbstractApplicationEventStoreMixin

      `domainEventType, identity, lock, logger, module, transactionEventsType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MemoryApplicationEventStoreService.MemoryStoreMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `storeEvents(TransactionApplicationEvents transactionDomain)`
    `Input<TransactionApplicationEvents,IOException>` | `transactionsAfter(long afterTimestamp, long maxTransactions)` Get list of event transactions after the given timestamp.
    `Input<TransactionApplicationEvents,IOException>` | `transactionsBefore(long beforeTimestamp, long maxTransactions)` Get list of event transactions before the given timestamp.

    - ### Methods inherited from class org.qi4j.library.eventsourcing.application.source.AbstractApplicationEventStoreMixin

      `activateApplicationEventStore, commit, lock, passivateApplicationEventStore, registerListener, rollback, storeEvents, unregisterListener`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.qi4j.library.eventsourcing.application.source.ApplicationEventStoreActivation

      `activateApplicationEventStore, passivateApplicationEventStore`

- - ### Constructor Detail

    - #### MemoryApplicationEventStoreService.MemoryStoreMixin

          public MemoryApplicationEventStoreService.MemoryStoreMixin()

  - ### Method Detail

    - #### transactionsAfter

          public Input<TransactionApplicationEvents,IOException> transactionsAfter(long afterTimestamp,
                                                                          long maxTransactions)

      Description copied from interface: `ApplicationEventSource`
      Get list of event transactions after the given timestamp.

      If they are on the exact same timestamp, they will not be included.

      The method uses the visitor pattern, so a visitor is sent in which is given each transaction, one at a time.

      Specified by:
        `transactionsAfter` in interface `ApplicationEventSource`
      Parameters:
        `afterTimestamp` - timestamp of transactions
        `maxTransactions` - maximum transactions
      Returns:
        list of event transactions

    - #### transactionsBefore

          public Input<TransactionApplicationEvents,IOException> transactionsBefore(long beforeTimestamp,
                                                                           long maxTransactions)

      Description copied from interface: `ApplicationEventSource`
      Get list of event transactions before the given timestamp.

      If they are on the exact same timestamp, they will not be included.

      The method uses the visitor pattern, so a visitor is sent in which is given each transaction, one at a time.

      The transactions are sent to the visitor with the latest transaction first, i.e. walking backwards in the stream.

      Specified by:
        `transactionsBefore` in interface `ApplicationEventSource`
      Parameters:
        `beforeTimestamp` - timestamp of transactions
        `maxTransactions` - maximum transactions
      Returns:
        list of event transactions

    - #### storeEvents

          protected void storeEvents(TransactionApplicationEvents transactionDomain)
                              throws IOException

      Specified by:
        `storeEvents` in class `AbstractApplicationEventStoreMixin`
      Throws:
        `IOException`