use of edu.iu.dsc.tws.task.window.api.WindowMessageImpl in project twister2 by DSC-SPIDAL.
the class WindowManager method bundleNonExpiredWindowIMessage.
/**
* This method bundles data into a IWindowMessage for creating non-expired IWindowMessages
*
* @param events list of elements that need to be passed into a window
* @return a bundled IWindowMessage considering a list of IMessages of a given data type
*/
public IWindowMessage<T> bundleNonExpiredWindowIMessage(List<IMessage<T>> events) {
WindowMessageImpl winMessage = null;
List<IMessage<T>> messages = new ArrayList<>();
for (IMessage<T> m : events) {
messages.add(m);
}
winMessage = new WindowMessageImpl(messages);
return winMessage;
}
use of edu.iu.dsc.tws.task.window.api.WindowMessageImpl in project twister2 by DSC-SPIDAL.
the class WindowManager method bundleWindowMessage.
public IWindowMessage<T> bundleWindowMessage(List<Event<T>> events) {
WindowMessageImpl winMessage = null;
List<IMessage<T>> messages = new ArrayList<>();
for (Event<T> event : events) {
IMessage<T> m = event.get();
messages.add(m);
}
winMessage = new WindowMessageImpl(messages);
return winMessage;
}
use of edu.iu.dsc.tws.task.window.api.WindowMessageImpl in project twister2 by DSC-SPIDAL.
the class WindowManager method bundleExpiredWindowIMessage.
/**
* This method bundles data into a IWindowMessage for creating expired IWindowMessages
*
* @param events list of elements that need to be passed into a window
* @return a bundled IWindowMessage considering a list of IMessages of a given data type
*/
public IWindowMessage<T> bundleExpiredWindowIMessage(List<IMessage<T>> events) {
WindowMessageImpl winMessage = null;
List<IMessage<T>> messages = new ArrayList<>();
for (IMessage<T> m : events) {
messages.add(m);
}
winMessage = new WindowMessageImpl(null, messages);
return winMessage;
}
Aggregations