For implementing tumbling windows, it would be better if a Deque was used for the actual buffer