T - the type of data being passedpublic class HistorySink<T> extends Object implements Sink<T>
Sink which maintains a history of items received during any given interval between calls to
its advance method.
It has a limited capacity, remembering only the latest k intervals.| Constructor and Description |
|---|
HistorySink(int capacity)
Constructs a new history sink with a given capacity
|
public HistorySink(int capacity)
capacity - the number of items this history sink may holdpublic void advance()
public void put(T t) throws RippleException
put in interface Sink<T>t - the data item being passedRippleException - if a data handling error occurspublic Source<T> get(int index)
index - the index of the desired step in the history.
The current step has an index of 0,
while the previous step has an index of 1, etc.Copyright © 2007-2012 fortytwo.net. All Rights Reserved.