T - the message typepublic final class ChannelReceiver<T> extends Object
| Constructor and Description |
|---|
ChannelReceiver(long expiryDuration,
TimeUnit unit) |
| Modifier and Type | Method and Description |
|---|---|
Optional<T> |
getLastKnownValue()
Gets the last known value.
|
OptionalLong |
getLastReceivedTimestamp()
Gets the timestamp when the last value was received.
|
Optional<T> |
getValue()
Gets the value.
|
void |
set(T value) |
String |
toString() |
public void set(T value)
public Optional<T> getLastKnownValue()
public Optional<T> getValue()
Returns empty if the expiry on the last known value has been exceeded.
public OptionalLong getLastReceivedTimestamp()
Copyright © 2020. All rights reserved.