org.qi4j.library.eventsourcing.domain.source
Class AbstractEventStoreMixin
java.lang.Object
org.qi4j.library.eventsourcing.domain.source.AbstractEventStoreMixin
- All Implemented Interfaces:
- Activatable, EventStore, EventStream
- Direct Known Subclasses:
- JdbmEventStoreService.JdbmEventStoreMixin, MemoryEventStoreService.MemoryEventStoreMixin
public abstract class AbstractEventStoreMixin
- extends Object
- implements EventStore, EventStream, Activatable
Base implementation for EventStores.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 ModuleSPI module
AbstractEventStoreMixin
public AbstractEventStoreMixin()
activate
public void activate()
throws IOException
- Description copied from interface:
Activatable
- This is invoked on the service when the instance is being activated
- Specified by:
activate
in interface Activatable
- Throws:
IOException
passivate
public void passivate()
throws Exception
- Description copied from interface:
Activatable
- This is invoked on the service when the instance is being passivated
- Specified by:
passivate
in interface Activatable
- Throws:
Exception
- if the service could not be passivated
storeEvents
public void storeEvents(UnitOfWorkDomainEventsValue events)
throws IOException
- Specified by:
storeEvents
in interface EventStore
- Throws:
IOException
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 void storeEvents0(UnitOfWorkDomainEventsValue unitOfWorkDomainValue)
throws IOException
- Throws:
IOException
lock
protected void lock()
- Fix for this bug:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6822370