org.qi4j.library.eventsourcing.domain.source.jdbm
Class JdbmEventStoreService.JdbmEventStoreMixin

java.lang.Object
  extended by org.qi4j.library.eventsourcing.domain.source.AbstractEventStoreMixin
      extended by org.qi4j.library.eventsourcing.domain.source.jdbm.JdbmEventStoreService.JdbmEventStoreMixin
All Implemented Interfaces:
Activatable, EventManagement, EventSource, EventStore, EventStream
Enclosing interface:
JdbmEventStoreService

public static class JdbmEventStoreService.JdbmEventStoreMixin
extends AbstractEventStoreMixin
implements EventManagement, EventSource


Field Summary
 
Fields inherited from class org.qi4j.library.eventsourcing.domain.source.AbstractEventStoreMixin
domainEventType, eventsType, identity, lock, logger, module
 
Constructor Summary
JdbmEventStoreService.JdbmEventStoreMixin()
           
 
Method Summary
 void activate()
          This is invoked on the service when the instance is being activated
 long count()
           
 Input<UnitOfWorkDomainEventsValue,IOException> events(long offset, long limit)
          Get list of UnitOfWorkDomainEventsValue after the given offset.
 void passivate()
          This is invoked on the service when the instance is being passivated
 Output<String,IOException> restore()
          Output used to restore events from a backup
protected  void storeEvents0(UnitOfWorkDomainEventsValue unitOfWorkDomainValue)
           
 
Methods inherited from class org.qi4j.library.eventsourcing.domain.source.AbstractEventStoreMixin
lock, registerListener, storeEvents, unregisterListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbmEventStoreService.JdbmEventStoreMixin

public JdbmEventStoreService.JdbmEventStoreMixin()
Method Detail

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
Overrides:
activate in class AbstractEventStoreMixin
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
Overrides:
passivate in class AbstractEventStoreMixin
Throws:
Exception - if the service could not be passivated

restore

public Output<String,IOException> restore()
Description copied from interface: EventManagement
Output used to restore events from a backup

Specified by:
restore in interface EventManagement
Returns:

events

public Input<UnitOfWorkDomainEventsValue,IOException> events(long offset,
                                                             long limit)
Description copied from interface: EventSource
Get list of UnitOfWorkDomainEventsValue after the given offset. To get the first set of events, use 0 as offset parameter to get events from the start.

Specified by:
events in interface EventSource
Parameters:
offset - where in the list of events to start
limit - maximum number of events returned

count

public long count()
Specified by:
count in interface EventSource

storeEvents0

protected void storeEvents0(UnitOfWorkDomainEventsValue unitOfWorkDomainValue)
                     throws IOException
Specified by:
storeEvents0 in class AbstractEventStoreMixin
Throws:
IOException