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

# Interface OOCStream<T>

All Superinterfaces:
  `OOCStreamable<T>`

All Known Implementing Classes:
  `FilteredOOCStream`, `MergedOOCStream`, `PlaybackStream`, `SourceOOCStream`, `SplittingOOCStream`, `SubOOCStream`, `SubscribableTaskQueue`

public interface OOCStream<T> extends OOCStreamable<T>

## Nested Class Summary

Nested Classes
Modifier and Type
Interface
Description
`static interface`
`OOCStream.GroupQueueCallback<T>`
`static interface`
`OOCStream.QueueCallback<T>`
`static class`
`OOCStream.SimpleQueueCallback<T>`

## Method Summary

Modifier and Type
Method
Description
`void`
`closeInput()`
`T`
`dequeue()`
`OOCStream.QueueCallback<T>`
`dequeueCB()`
`void`
`enqueue(OOCStream.QueueCallback<T> callback)`
`void`
`enqueue(T t)`
`static <T> OOCStream.QueueCallback<T>`
`eos(DMLRuntimeException e)`
`void`
`propagateFailure(DMLRuntimeException re)`
`void`
`setSubscriber(Consumer<OOCStream.QueueCallback<T>> subscriber)`
Registers a new subscriber that consumes the stream.

### Methods inherited from interface org.apache.sysds.runtime.instructions.ooc.OOCStreamable

`addDownstreamMessageRelay, addUpstreamMessageRelay, clearDownstreamMessageRelays, clearUpstreamMessageRelays, getData, getDataCharacteristics, getReadStream, getStreamCache, getWriteStream, hasStreamCache, isProcessed, messageDownstream, messageUpstream, setData, setDownstreamMessageRelay, setIXTransform, setUpstreamMessageRelay`

## Method Details

### eos

static <T> OOCStream.QueueCallback<T> eos(DMLRuntimeException e)

### enqueue

void enqueue(T t)

### enqueue

void enqueue(OOCStream.QueueCallback<T> callback)

### dequeue

T dequeue()

### dequeueCB

OOCStream.QueueCallback<T> dequeueCB()

### closeInput

void closeInput()

### propagateFailure

void propagateFailure(DMLRuntimeException re)

### setSubscriber

void setSubscriber(Consumer<OOCStream.QueueCallback<T>> subscriber)
Registers a new subscriber that consumes the stream. While there is no guarantee for any specific order, the closing item LocalTaskQueue.NO_MORE_TASKS is guaranteed to be invoked after every other item has finished processing. Thus, the NO_MORE_TASKS callback can be used to free dependent resources and close output streams.