Package org.apache.sysds.runtime.instructions.ooc

# Class OOCStream.SimpleQueueCallback<T>

java.lang.Object
org.apache.sysds.runtime.instructions.ooc.OOCStream.SimpleQueueCallback<T>

All Implemented Interfaces:
  `AutoCloseable`, `OOCStream.QueueCallback<T>`

Enclosing interface:
  OOCStream<T>

public static class OOCStream.SimpleQueueCallback<T> extends Object implements OOCStream.QueueCallback<T>

## Constructor Summary

Constructors
Constructor
Description
`SimpleQueueCallback(T result, DMLRuntimeException failure)`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`void`
`fail(DMLRuntimeException failure)`
`T`
`get()`
`boolean`
`isEos()`
`boolean`
`isFailure()`
`OOCStream.QueueCallback<T>`
`keepOpen()`
Keeps the callback item pinned in memory until the returned callback is also closed.

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

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

## Constructor Details

### SimpleQueueCallback

public SimpleQueueCallback(T result, DMLRuntimeException failure)

## Method Details

### get

public T get()

Specified by:
  `get` in interface `OOCStream.QueueCallback<T>`

### keepOpen

public OOCStream.QueueCallback<T> keepOpen()
Description copied from interface: `OOCStream.QueueCallback`
Keeps the callback item pinned in memory until the returned callback is also closed.

Specified by:
  `keepOpen` in interface `OOCStream.QueueCallback<T>`

### fail

public void fail(DMLRuntimeException failure)

Specified by:
  `fail` in interface `OOCStream.QueueCallback<T>`

### close

public void close()

Specified by:
  `close` in interface `AutoCloseable`
Specified by:
  `close` in interface `OOCStream.QueueCallback<T>`

### isEos

public boolean isEos()

Specified by:
  `isEos` in interface `OOCStream.QueueCallback<T>`

### isFailure

public boolean isFailure()

Specified by:
  `isFailure` in interface `OOCStream.QueueCallback<T>`