Skip navigation links
com.oracle.cep.cluster.ha.adapter
Class BufferingQueueTrimmingStrategy
java.lang.Object
|
+--com.oracle.cep.cluster.ha.adapter.BufferingQueueTrimmingStrategy
- public class BufferingQueueTrimmingStrategy
- extends java.lang.Object
- implements QueueTrimmingStrategy
QueueTrimmingStrategy
that trims the backup queue based on a sliding window of events. The queue is trimmed keeping a maximum of getWindowLength()
events. The trimmed queue is assumed to be an instance of TimedTrimmableQueue
so that older events can be easily trimmed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BufferingQueueTrimmingStrategy
public BufferingQueueTrimmingStrategy()
setWindowLength
public void setWindowLength(long millis)
- Set the sliding window length
-
- Parameters:
millis
- the length in milliseconds
getWindowLength
public long getWindowLength()
-
- Returns:
- the sliding window length
onProcessedEvent
public void onProcessedEvent(java.lang.Object event)
-
- Specified by:
- onProcessedEvent in interface QueueTrimmingStrategy
onQueuedEvent
public void onQueuedEvent(TrimmableQueue queue)
-
- Specified by:
- onQueuedEvent in interface QueueTrimmingStrategy
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception