org.qi4j.library.eventsourcing.application.source
Class AbstractApplicationEventStoreMixin
java.lang.Object
org.qi4j.library.eventsourcing.application.source.AbstractApplicationEventStoreMixin
- All Implemented Interfaces:
- Activatable, ApplicationEventStore, ApplicationEventStream
public abstract class AbstractApplicationEventStoreMixin
- extends Object
- implements ApplicationEventStore, ApplicationEventStream, Activatable
Base implementation for ApplicationEventStores.
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
transactionEventsType
protected ValueType transactionEventsType
lock
protected Lock lock
module
@Structure
protected ModuleSPI module
AbstractApplicationEventStoreMixin
public AbstractApplicationEventStoreMixin()
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 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