org.apache.ignite.internal.util

## Class GridSpiCloseableIteratorWrapper<T>

- java.lang.Object
- - org.apache.ignite.internal.util.lang.GridIteratorAdapter<T>
  - - org.apache.ignite.internal.util.GridCloseableIteratorAdapter<T>
    - - org.apache.ignite.internal.util.GridSpiCloseableIteratorWrapper<T>

All Implemented Interfaces:
  Serializable, AutoCloseable, Iterable<T>, Iterator<T>, GridSerializableIterator<T>, GridCloseableIterator<T>, GridIterator<T>, IgniteSpiCloseableIterator<T>

    public class GridSpiCloseableIteratorWrapper<T>
    extends GridCloseableIteratorAdapter<T>

Wrapper used to covert `IgniteSpiCloseableIterator` to `GridCloseableIterator`.

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`GridSpiCloseableIteratorWrapper(IgniteSpiCloseableIterator<T> iter)`

### Method Summary

Methods
`protected void` `onClose()` Invoked on iterator close.
`protected boolean` `onHasNext()`
`protected T` `onNext()`
`protected void` `onRemove()` Called on remove from iterator.

### Methods inherited from class org.apache.ignite.internal.util.GridCloseableIteratorAdapter

`checkClosed, close, hasNextX, isClosed, nextX, removeX`

### Methods inherited from class org.apache.ignite.internal.util.lang.GridIteratorAdapter

`hasNext, iterator, next, remove`

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

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

### Methods inherited from interface java.lang.Iterable

`iterator`

### Methods inherited from interface java.util.Iterator

`hasNext, next, remove`

### Constructor Detail

#### GridSpiCloseableIteratorWrapper

    public GridSpiCloseableIteratorWrapper(IgniteSpiCloseableIterator<T> iter)

Parameters:
  `iter` - Spi iterator.

### Method Detail

#### onNext

    protected T onNext()
                throws IgniteCheckedException

Specified by:
  `onNext` in class `GridCloseableIteratorAdapter<T>`
Returns:
  Next element.
Throws:
  `IgniteCheckedException` - If failed.

#### onHasNext

    protected boolean onHasNext()
                         throws IgniteCheckedException

Specified by:
  `onHasNext` in class `GridCloseableIteratorAdapter<T>`
Returns:
  `True` if iterator has next element.
Throws:
  `IgniteCheckedException` - If failed.

#### onClose

    protected void onClose()
                    throws IgniteCheckedException

Invoked on iterator close.

Overrides:
  `onClose` in class `GridCloseableIteratorAdapter<T>`
Throws:
  `IgniteCheckedException` - If closing failed.

#### onRemove

    protected void onRemove()
                     throws IgniteCheckedException

Called on remove from iterator.

Overrides:
  `onRemove` in class `GridCloseableIteratorAdapter<T>`
Throws:
  `IgniteCheckedException` - If failed.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0.final
Release Date | : December 29 2015