public class IncomingStream
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.util.concurrent.atomic.AtomicBoolean |
inited |
protected java.lang.String |
nodeID
Currrent nodeID.
|
protected java.util.HashMap<java.lang.Long,io.datatree.Tree> |
pool |
protected long |
prevSeq |
protected PacketStream |
stream
Internal stream with listeners.
|
protected long |
timeoutAt
Timestamp of the next timeout (0 = no timeout).
|
protected long |
timeoutMillis
Stream inactivity/read timeout in MILLISECONDS (0 = no timeout).
|
| Constructor and Description |
|---|
IncomingStream(java.lang.String nodeID,
java.util.concurrent.ScheduledExecutorService scheduler,
long timeoutMillis) |
| Modifier and Type | Method and Description |
|---|---|
void |
error(java.lang.Throwable cause) |
PacketStream |
getPacketStream() |
long |
getTimeoutAt() |
boolean |
inited() |
protected boolean |
processMessage(io.datatree.Tree message) |
boolean |
receive(io.datatree.Tree message) |
void |
reset()
Used for testing.
|
protected final java.lang.String nodeID
protected final PacketStream stream
protected final long timeoutMillis
protected volatile long timeoutAt
protected volatile long prevSeq
protected final java.util.HashMap<java.lang.Long,io.datatree.Tree> pool
protected java.util.concurrent.atomic.AtomicBoolean inited
public IncomingStream(java.lang.String nodeID,
java.util.concurrent.ScheduledExecutorService scheduler,
long timeoutMillis)
public void reset()
public void error(java.lang.Throwable cause)
public boolean inited()
public boolean receive(io.datatree.Tree message)
protected boolean processMessage(io.datatree.Tree message)
public long getTimeoutAt()
public PacketStream getPacketStream()