public class CacheEventStore extends Object implements IEventStore
IEventStore using an in-memory disk overflowable Cache as the persistency medium| Constructor and Description |
|---|
CacheEventStore() |
CacheEventStore(int keepInMemory) |
CacheEventStore(int keepInMemory,
net.sf.ehcache.store.MemoryStoreEvictionPolicy evictionPolicy) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the
IEventStore instance as well as any permanent storage resources occupied |
long |
getEventCount()
Retrieves the number of
BufferEvents stored using this IEventStore |
void |
persist(BufferEvent event)
Persists the provided
BufferEvent |
BufferEvent |
retrieveByIndex(long eventIndex)
Retrieve a previously stored
BufferEvent based on the index by which it was stored |
public CacheEventStore(int keepInMemory,
net.sf.ehcache.store.MemoryStoreEvictionPolicy evictionPolicy)
public CacheEventStore(int keepInMemory)
public CacheEventStore()
public long getEventCount()
BufferEvents stored using this IEventStoregetEventCount in interface IEventStoreBufferEvents storedIEventStore.getEventCount()public void dispose()
throws GRS2EventStoreException
IEventStore instance as well as any permanent storage resources occupieddispose in interface IEventStoreGRS2EventStoreException - the state of the IEventStore does not allow for this operation to be completedIEventStore.dispose()public void persist(BufferEvent event) throws GRS2EventStoreException
BufferEventpersist in interface IEventStoreevent - the BufferEvent to persistGRS2EventStoreException - the state of the IEventStore does not allow for this operation to be completedIEventStore.persist(BufferEvent)public BufferEvent retrieveByIndex(long eventIndex) throws GRS2EventStoreException
BufferEvent based on the index by which it was storedretrieveByIndex in interface IEventStoreeventIndex - The index by which the BufferEvent to be retrieved was storedBufferEvent retrievedGRS2EventStoreException - the state of the IEventStore does not allow for this operation to be completedIEventStore.retrieveByIndex(long)Copyright © 2014. All Rights Reserved.