org.apache.ignite.streamer.window

## Class StreamerUnboundedWindow<E>

- java.lang.Object
- - org.apache.ignite.streamer.window.StreamerWindowAdapter<E>
  - - org.apache.ignite.streamer.window.StreamerUnboundedWindow<E>

All Implemented Interfaces:
  Iterable<E>, LifecycleAware, StreamerWindow<E>, StreamerWindowMBean

    public class StreamerUnboundedWindow<E>
    extends StreamerWindowAdapter<E>

Unbounded window which holds all events. Events can be evicted manually from window via any of the `dequeue(...)` methods.

### Constructor Summary

Constructors
Constructor and Description
`StreamerUnboundedWindow()`

### Method Summary

Methods
`void` `checkConfiguration()` Check window configuration.
`protected Collection<E>` `dequeue0(int cnt)` Dequeues up to cnt elements from window.
`boolean` `enqueue0(E evt)` Adds event to window.
`int` `evictionQueueSize()` Gets number of entries available for eviction.
`protected GridStreamerWindowIterator<E>` `iterator0()` Returns an iterator over a set of elements of type T without check for iteration limit.
`protected Collection<E>` `pollEvicted0(int cnt)` If window supports eviction, this method will return up to cnt evicted elements.
`protected Collection<E>` `pollEvictedBatch0()` If window supports batch eviction, this method will poll next evicted batch from window.
`protected void` `reset0()` Reset routine.
`int` `size()` Gets number of events currently stored in window.
`protected void` `stop0()` Dispose window.

### Methods inherited from class org.apache.ignite.streamer.window.StreamerWindowAdapter

`clearEvicted, dequeue, dequeue, dequeueAll, enqueue, enqueue, enqueueAll, getClassName, getEvictionQueueSize, getFilter, getName, getSize, index, index, indexes, indexProviders, iterator, name, pollEvicted, pollEvicted, pollEvictedAll, pollEvictedBatch, reset, setFilter, setIndexes, setName, snapshot, start, stop, updateIndexes`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### StreamerUnboundedWindow

    public StreamerUnboundedWindow()

### Method Detail

#### stop0

    protected void stop0()

Dispose window.

Specified by:
  `stop0` in class `StreamerWindowAdapter<E>`

#### checkConfiguration

    public void checkConfiguration()

Check window configuration.

Specified by:
  `checkConfiguration` in class `StreamerWindowAdapter<E>`

#### reset0

    protected void reset0()

Reset routine.

Specified by:
  `reset0` in class `StreamerWindowAdapter<E>`

#### size

    public int size()

Gets number of events currently stored in window.

Returns:
  Current size of the window.

#### iterator0

    protected GridStreamerWindowIterator<E> iterator0()

Returns an iterator over a set of elements of type T without check for iteration limit. That is, in case concurrent thread constantly adding new elements to the window we could iterate forever.

Specified by:
  `iterator0` in class `StreamerWindowAdapter<E>`
Returns:
  Iterator.

#### evictionQueueSize

    public int evictionQueueSize()

Gets number of entries available for eviction.

Returns:
  Number of entries available for eviction.

#### enqueue0

    public boolean enqueue0(E evt)

Adds event to window.

Specified by:
  `enqueue0` in class `StreamerWindowAdapter<E>`
Parameters:
  `evt` - Event.
Returns:
  `True` if event added.

#### dequeue0

    protected Collection<E> dequeue0(int cnt)

Dequeues up to cnt elements from window. If current window size is less than cnt, will dequeue all elements from window.

Specified by:
  `dequeue0` in class `StreamerWindowAdapter<E>`
Parameters:
  `cnt` - Count.
Returns:
  Dequeued elements.

#### pollEvicted0

    protected Collection<E> pollEvicted0(int cnt)

If window supports eviction, this method will return up to cnt evicted elements.

Specified by:
  `pollEvicted0` in class `StreamerWindowAdapter<E>`
Parameters:
  `cnt` - Count.
Returns:
  Evicted elements.

#### pollEvictedBatch0

    protected Collection<E> pollEvictedBatch0()

If window supports batch eviction, this method will poll next evicted batch from window. If windows does not support batch eviction but supports eviction, will return collection of single last evicted element. If window does not support eviction, will return empty collection.

Specified by:
  `pollEvictedBatch0` in class `StreamerWindowAdapter<E>`
Returns:
  Elements from evicted batch.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0-RC1
Release Date | : February 17 2015