org.qi4j.library.eventsourcing.domain.source

## Class AbstractEventStoreMixin

- java.lang.Object
- - org.qi4j.library.eventsourcing.domain.source.AbstractEventStoreMixin

- All Implemented Interfaces:
    EventStore, EventStoreActivation, EventStream
  Direct Known Subclasses:
    JdbmEventStoreService.JdbmEventStoreMixin, MemoryEventStoreService.MemoryEventStoreMixin

      public abstract class AbstractEventStoreMixin
      extends Object
      implements EventStore, EventStream, EventStoreActivation

  Base implementation for EventStores.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.qi4j.library.eventsourcing.domain.source.EventStoreActivation

      `EventStoreActivation.Activator`

  - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractEventStoreMixin()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `activateEventStore()`
    `protected void` | `lock()` Fix for this bug: http://bugs.sun.com/bugdatabase/view_bug.do?
    `void` | `passivateEventStore()`
    `void` | `registerListener(UnitOfWorkEventsListener subscriber)`
    `Output<UnitOfWorkDomainEventsValue,IOException>` | `storeEvents()`
    `protected abstract Output<UnitOfWorkDomainEventsValue,IOException>` | `storeEvents0()`
    `void` | `unregisterListener(UnitOfWorkEventsListener subscriber)`

    - ### 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

    - #### eventsType

          protected ValueType eventsType

    - #### lock

          protected Lock lock

    - #### module

          @Structure
          protected Module module

  - ### Constructor Detail

    - #### AbstractEventStoreMixin

          public AbstractEventStoreMixin()

  - ### Method Detail

    - #### activateEventStore

          public void activateEventStore()
                                  throws Exception

      Specified by:
        `activateEventStore` in interface `EventStoreActivation`
      Throws:
        `Exception`

    - #### passivateEventStore

          public void passivateEventStore()
                                   throws Exception

      Specified by:
        `passivateEventStore` in interface `EventStoreActivation`
      Throws:
        `Exception`

    - #### storeEvents

          public Output<UnitOfWorkDomainEventsValue,IOException> storeEvents()

      Specified by:
        `storeEvents` in interface `EventStore`

    - #### registerListener

          public void registerListener(UnitOfWorkEventsListener subscriber)

      Specified by:
        `registerListener` in interface `EventStream`

    - #### unregisterListener

          public void unregisterListener(UnitOfWorkEventsListener subscriber)

      Specified by:
        `unregisterListener` in interface `EventStream`

    - #### storeEvents0

          protected abstract Output<UnitOfWorkDomainEventsValue,IOException> storeEvents0()

    - #### lock

          protected void lock()

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