org.qi4j.library.eventsourcing.domain.source.memory
Class MemoryEventStoreService.MemoryEventStoreMixin

java.lang.Object
  extended by org.qi4j.library.eventsourcing.domain.source.AbstractEventStoreMixin
      extended by org.qi4j.library.eventsourcing.domain.source.memory.MemoryEventStoreService.MemoryEventStoreMixin
All Implemented Interfaces:
Activatable, EventSource, EventStore, EventStream
Enclosing interface:
MemoryEventStoreService

public abstract static class MemoryEventStoreService.MemoryEventStoreMixin
extends AbstractEventStoreMixin
implements EventSource


Field Summary
 
Fields inherited from class org.qi4j.library.eventsourcing.domain.source.AbstractEventStoreMixin
domainEventType, eventsType, identity, lock, logger, module
 
Constructor Summary
MemoryEventStoreService.MemoryEventStoreMixin()
           
 
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
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

MemoryEventStoreService.MemoryEventStoreMixin

public MemoryEventStoreService.MemoryEventStoreMixin()
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

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