com.amazon.redshift.core.v3

## Class RedshiftRowsBlockingQueue<E>

- java.lang.Object
- - java.util.AbstractCollection<E>
  - - java.util.AbstractQueue<E>
    - - java.util.concurrent.LinkedBlockingQueue<E>
      - - com.amazon.redshift.core.v3.RedshiftRowsBlockingQueue<E>

All Implemented Interfaces:
  Serializable, Iterable<E>, Collection<E>, BlockingQueue<E>, Queue<E>

    public class RedshiftRowsBlockingQueue<E>
    extends LinkedBlockingQueue<E>

See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`RedshiftRowsBlockingQueue(int capacity)`
`RedshiftRowsBlockingQueue(int fetchSize, long fetchRingBufferSize, RedshiftLogger logger)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addEndOfRowsIndicator()` Add end-of-rows indicator
`void` `checkAndAddEndOfRowsIndicator()` Add end-of-rows indicator, if not added.
`void` `checkAndAddEndOfRowsIndicator(com.amazon.redshift.core.v3.Portal currentSuspendedPortal)`
`void` `close()` Close the queue.
`boolean` `endOfResult()`
`int` `getCurrentRowIndex()`
`SQLException` `getHandlerException()`
`com.amazon.redshift.core.v3.Portal` `getSuspendedPortal()`
`boolean` `isSuspendedPortal()`
`void` `put(E e)`
`void` `setHandlerException(SQLException ex)`
`void` `setSkipRows()`
`E` `take()`

### Methods inherited from class java.util.concurrent.LinkedBlockingQueue

`clear, contains, drainTo, drainTo, iterator, offer, offer, peek, poll, poll, remainingCapacity, remove, size, spliterator, toArray, toArray, toString`

### Methods inherited from class java.util.AbstractQueue

`add, addAll, element, remove`

### Methods inherited from class java.util.AbstractCollection

`containsAll, isEmpty, removeAll, retainAll`

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

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

### Methods inherited from interface java.util.concurrent.BlockingQueue

`add`

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

`element, remove`

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

`addAll, containsAll, equals, hashCode, isEmpty, parallelStream, removeAll, removeIf, retainAll, stream`

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

`forEach`

### Constructor Detail

#### RedshiftRowsBlockingQueue

    public RedshiftRowsBlockingQueue(int capacity)

#### RedshiftRowsBlockingQueue

    public RedshiftRowsBlockingQueue(int fetchSize,
                                     long fetchRingBufferSize,
                                     RedshiftLogger logger)

### Method Detail

#### put

    public void put(E e)
             throws InterruptedException

Specified by:
  `put` in interface `BlockingQueue<E>`
Overrides:
  `put` in class `LinkedBlockingQueue<E>`
Throws:
  `InterruptedException`

#### take

    public E take()
           throws InterruptedException

Specified by:
  `take` in interface `BlockingQueue<E>`
Overrides:
  `take` in class `LinkedBlockingQueue<E>`
Throws:
  `InterruptedException`

#### getCurrentRowIndex

    public int getCurrentRowIndex()

#### endOfResult

    public boolean endOfResult()

#### setHandlerException

    public void setHandlerException(SQLException ex)

#### getHandlerException

    public SQLException getHandlerException()

#### close

    public void close()

Close the queue.

#### setSkipRows

    public void setSkipRows()

#### addEndOfRowsIndicator

    public void addEndOfRowsIndicator()
                               throws InterruptedException

Add end-of-rows indicator

Throws:
  `InterruptedException` - throws when the thread gets interrupted.

#### checkAndAddEndOfRowsIndicator

    public void checkAndAddEndOfRowsIndicator()
                                       throws InterruptedException

Add end-of-rows indicator, if not added.

Throws:
  `InterruptedException` - throws when the thread gets interrupted.

#### checkAndAddEndOfRowsIndicator

    public void checkAndAddEndOfRowsIndicator(com.amazon.redshift.core.v3.Portal currentSuspendedPortal)
                                       throws InterruptedException

Throws:
  `InterruptedException`

#### getSuspendedPortal

    public com.amazon.redshift.core.v3.Portal getSuspendedPortal()

#### isSuspendedPortal

    public boolean isSuspendedPortal()