K - the expected type of the service response keyV - the expected type of the service response valuepublic class AtomicCacheEntryInboundAdapter<K,V> extends Object implements InboundAdapter
InboundAdapter where the service response payload is expected to be
an AtomicCacheEntry, allowing for synchronized access to a given service cache entry.| Modifier and Type | Field and Description |
|---|---|
private io.netty.buffer.ByteBuf |
byteBuf
Container for bytes queued from the service response
Channel. |
private Deserializer<V> |
deserializer
The deserializer to be used to construct the value from the service response object.
|
private InboundToken<V> |
inboundToken
The state of receipt of an individual service response token.
|
private K |
key
The key of the requested service map entry.
|
private AtomicCacheEntry<K,V,Long> |
result
The cache entry reassembled from the service response.
|
private Long |
revision
The cache revision of the requested object.
|
| Constructor and Description |
|---|
AtomicCacheEntryInboundAdapter(K key,
Deserializer<V> deserializer)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dequeue()
Parse the received content into a form suitable for supplying to the remote method caller.
|
AtomicCacheEntry<K,V,Long> |
getResult() |
boolean |
isComplete()
Check for receipt of all response content expected from server.
|
void |
queue(byte[] bytes)
Add
Channel content to a queue for later processing |
private final K key
private final Deserializer<V> deserializer
private final io.netty.buffer.ByteBuf byteBuf
Channel.private final InboundToken<V> inboundToken
private Long revision
private AtomicCacheEntry<K,V,Long> result
public AtomicCacheEntryInboundAdapter(K key, Deserializer<V> deserializer)
key - the key of the requested service cache map entrydeserializer - the deserializer to be used to construct the service response map valuepublic AtomicCacheEntry<K,V,Long> getResult()
public boolean isComplete()
InboundAdapterisComplete in interface InboundAdapterpublic void queue(byte[] bytes)
InboundAdapterChannel content to a queue for later processingqueue in interface InboundAdapterbytes - the remote content to queuepublic void dequeue()
throws IOException
InboundAdapterdequeue in interface InboundAdapterIOException - on failure parsing the contentCopyright © 2022 Apache NiFi Project. All rights reserved.