Search in sources :

Example 1 with TupleWindowImpl

use of backtype.storm.windowing.TupleWindowImpl in project jstorm by alibaba.

the class WindowedBoltExecutor method newWindowLifecycleListener.

protected WindowLifecycleListener<Tuple> newWindowLifecycleListener() {
    return new WindowLifecycleListener<Tuple>() {

        @Override
        public void onExpiry(List<Tuple> tuples) {
            for (Tuple tuple : tuples) {
                windowedOutputCollector.ack(tuple);
            }
        }

        @Override
        public void onActivation(List<Tuple> tuples, List<Tuple> newTuples, List<Tuple> expiredTuples) {
            windowedOutputCollector.setContext(tuples);
            bolt.execute(new TupleWindowImpl(tuples, newTuples, expiredTuples));
        }
    };
}
Also used : TupleWindowImpl(backtype.storm.windowing.TupleWindowImpl) WindowLifecycleListener(backtype.storm.windowing.WindowLifecycleListener) List(java.util.List) Tuple(backtype.storm.tuple.Tuple)

Aggregations

Tuple (backtype.storm.tuple.Tuple)1 TupleWindowImpl (backtype.storm.windowing.TupleWindowImpl)1 WindowLifecycleListener (backtype.storm.windowing.WindowLifecycleListener)1 List (java.util.List)1