@java.lang.SuppressWarnings({"SynchronizedMethod"}) public class DataflowStreamWriteAdapter extends WithSerialId
Adapts a DataflowStream to accommodate for the DataflowWriteChannel interface. It also synchronizes all changes to the underlying stream allowing multiple threads accessing the stream concurrently.
- The type of messages to pass through the streamModifiers | Name | Description |
---|---|---|
private class |
DataflowStreamWriteAdapter.BindDataflowStream |
Modifiers | Name | Description |
---|---|---|
private StreamCore<T> |
head |
Fields inherited from class | Fields |
---|---|
class WithSerialId |
serialHandle, serialVersionUID |
Constructor and description |
---|
DataflowStreamWriteAdapter
(StreamCore<T> stream) Creates a new adapter |
Type | Name and description |
---|---|
void |
bind(T value) |
protected StreamCore<T> |
getHead() |
DataflowWriteChannel<T> |
leftShift(T value) |
DataflowWriteChannel<T> |
leftShift(DataflowReadChannel<T> ref) |
private void |
notifyRemote(T value) |
java.lang.String |
toString() |
private StreamCore<T> |
updateHead() Moves head |
Methods inherited from class | Name |
---|---|
class WithSerialId |
createRemoteHandle, getOrCreateSerialHandle, getRemoteClass, writeReplace |
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates a new adapter
stream
- The stream to wrapMoves head
Copyright © 2008–2014 Václav Pech. All Rights Reserved.