com.atlassian.crowd.event
Class EventStoreGeneric

java.lang.Object
  extended by com.atlassian.crowd.event.EventStoreGeneric
All Implemented Interfaces:
EventStore

public final class EventStoreGeneric
extends java.lang.Object
implements EventStore

Thread-safe EventStore implementation that uses main memory as a backing store. The amount of events stored is fixed, and after reaching the limit, the oldest events will start to get dropped.


Constructor Summary
EventStoreGeneric(long maxStoredEvents)
          Creates a new EventStoreGeneric instance.
 
Method Summary
 java.lang.String getCurrentEventToken()
           
 Events getNewEvents(java.lang.String eventToken)
           
 void invalidateEvents()
           
 void storeEvent(OperationEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventStoreGeneric

public EventStoreGeneric(long maxStoredEvents)
Creates a new EventStoreGeneric instance.

Parameters:
maxStoredEvents - maximum amount of events to keep in the memory
Method Detail

getCurrentEventToken

public java.lang.String getCurrentEventToken()
Specified by:
getCurrentEventToken in interface EventStore

getNewEvents

public Events getNewEvents(java.lang.String eventToken)
                    throws EventTokenExpiredException
Specified by:
getNewEvents in interface EventStore
Throws:
EventTokenExpiredException

storeEvent

public void storeEvent(OperationEvent event)
Specified by:
storeEvent in interface EventStore

invalidateEvents

public void invalidateEvents()
Specified by:
invalidateEvents in interface EventStore


Copyright © 2012 Atlassian. All Rights Reserved.