org.qi4j.library.eventsourcing.application.source

## Class AbstractApplicationEventStoreMixin

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

- All Implemented Interfaces:
    ApplicationEventStore, ApplicationEventStoreActivation, ApplicationEventStream
  Direct Known Subclasses:
    MemoryApplicationEventStoreService.MemoryStoreMixin

      public abstract class AbstractApplicationEventStoreMixin
      extends Object
      implements ApplicationEventStore, ApplicationEventStream, ApplicationEventStoreActivation

  Base implementation for ApplicationEventStores.

- - ### Nested Class Summary

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

      `ApplicationEventStoreActivation.Activator`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ValueType` | `domainEventType`
    `protected Identity` | `identity`
    `protected Lock` | `lock`
    `protected org.slf4j.Logger` | `logger`
    `protected Module` | `module`
    `protected ValueType` | `transactionEventsType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractApplicationEventStoreMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateApplicationEventStore()`
    `protected abstract void` | `commit()`
    `protected void` | `lock()` Fix for this bug: http://bugs.sun.com/bugdatabase/view_bug.do?
    `void` | `passivateApplicationEventStore()`
    `void` | `registerListener(Output<TransactionApplicationEvents,? extends Throwable> listener)`
    `protected abstract void` | `rollback()`
    `TransactionApplicationEvents` | `storeEvents(Iterable<ApplicationEvent> events)`
    `protected abstract void` | `storeEvents(TransactionApplicationEvents transactionDomain)`
    `void` | `unregisterListener(Output<TransactionApplicationEvents,? extends Throwable> listener)`

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

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

- - ### Field Detail

    - #### identity

          @This
          protected Identity identity

    - #### logger

          protected org.slf4j.Logger logger

    - #### domainEventType

          protected ValueType domainEventType

    - #### transactionEventsType

          protected ValueType transactionEventsType

    - #### lock

          protected Lock lock

    - #### module

          @Structure
          protected Module module

  - ### Constructor Detail

    - #### AbstractApplicationEventStoreMixin

          public AbstractApplicationEventStoreMixin()

  - ### Method Detail

    - #### activateApplicationEventStore

          public void activateApplicationEventStore()
                                             throws Exception

      Specified by:
        `activateApplicationEventStore` in interface `ApplicationEventStoreActivation`
      Throws:
        `Exception`

    - #### passivateApplicationEventStore

          public void passivateApplicationEventStore()
                                              throws Exception

      Specified by:
        `passivateApplicationEventStore` in interface `ApplicationEventStoreActivation`
      Throws:
        `Exception`

    - #### storeEvents

          public TransactionApplicationEvents storeEvents(Iterable<ApplicationEvent> events)
                                                   throws IOException

      Specified by:
        `storeEvents` in interface `ApplicationEventStore`
      Throws:
        `IOException`

    - #### registerListener

          public void registerListener(Output<TransactionApplicationEvents,? extends Throwable> listener)

      Specified by:
        `registerListener` in interface `ApplicationEventStream`

    - #### unregisterListener

          public void unregisterListener(Output<TransactionApplicationEvents,? extends Throwable> listener)

      Specified by:
        `unregisterListener` in interface `ApplicationEventStream`

    - #### rollback

          protected abstract void rollback()
                                    throws IOException

      Throws:
        `IOException`

    - #### commit

          protected abstract void commit()
                                  throws IOException

      Throws:
        `IOException`

    - #### storeEvents

          protected abstract void storeEvents(TransactionApplicationEvents transactionDomain)
                                       throws IOException

      Throws:
        `IOException`

    - #### lock

          protected void lock()

      Fix for this bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6822370