protected class ContinuousQueryCache.ConverterAsynchronousProcessor extends AsynchronousProcessor
AsynchronousProcessor to ensure the result of the EntryProcessor
 execution is deserialized prior to passing to the provided AsynchronousProcessor.| Modifier and Type | Field and Description | 
|---|---|
protected Converter | 
f_convUp
Converter to deserialize  
Binary values. | 
protected AsynchronousProcessor | 
f_processor
The delegate  
AsynchronousProcessor. | 
m_eReason, m_listResultEntriesm_control, m_iOrderId| Constructor and Description | 
|---|
ConverterAsynchronousProcessor(AsynchronousProcessor processor)
Construct the processor to wrap the provided  
AsynchronousProcessor in order to
 ensure results are properly converted prior to return. | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
bind(FlowControl control)
Bind this agent with the specified underlying FlowControl object. 
 | 
boolean | 
cancel(boolean mayInterruptIfRunning)  | 
boolean | 
checkBacklog(Continuation continueNormal)
Check for an excessive backlog and if the underlying communication channel
 is indeed clogged, call the specified continuation when the backlog is
 back to normal or the service terminates. 
 | 
long | 
drainBacklog(long cMillis)
Check for an excessive backlog and allow blocking the calling thread for
 up to the specified amount of time. 
 | 
void | 
flush()
Ensure that any buffered asynchronous operations are dispatched to the
 underlying tier. 
 | 
Object | 
get()  | 
Object | 
get(long cTimeout,
   TimeUnit unit)  | 
CompletableFuture | 
getCompletableFuture()
Get the CompletableFuture. 
 | 
Throwable | 
getException()
Helper method that returns an exception (if completed exceptionally). 
 | 
InvocableMap.EntryProcessor | 
getProcessor()
Obtain the underlying entry processor. 
 | 
Object | 
getResult()
Helper method that calls  
AsynchronousAgent.get() and re-throws checked exceptions
 as a RuntimeException. | 
int | 
getUnitOfOrderId()
Return a unit-of-order id associated with this processor. 
 | 
boolean | 
isCancelled()  | 
boolean | 
isCompletedExceptionally()
Helper method to check if the operation failed. 
 | 
boolean | 
isDone()  | 
void | 
onComplete()
Called after the processor has been notified about all possible partial
 results or failures and no more are forthcoming. 
 | 
void | 
onException(Throwable eReason)
Called if any part of the operation failed for any reason. 
 | 
void | 
onResult(Map.Entry entry)
Called when there is a partial result of the asynchronous execution. 
 | 
Object | 
process(InvocableMap.Entry entry)
Not supported. 
 | 
Map | 
processAll(Set setEntries)
Not supported. 
 | 
complete, completeExceptionallyprotected final AsynchronousProcessor f_processor
AsynchronousProcessor.public ConverterAsynchronousProcessor(AsynchronousProcessor processor)
AsynchronousProcessor in order to
 ensure results are properly converted prior to return.processor - the processor to wrappublic void onResult(Map.Entry entry)
AbstractAsynchronousProcessor
 For a given request, calls to this method and AbstractAsynchronousProcessor.onException(java.lang.Throwable)
 may come concurrently.
 
 For ordering guarantees across different processor invocations see
 AbstractAsynchronousProcessor.getUnitOfOrderId().
 
Note: Overriding implementations of this method must be non-blocking.
onResult in class AsynchronousProcessorentry - an entry holding the key and a result of the operation for
               the given keypublic void onException(Throwable eReason)
AbstractAsynchronousProcessor"complete" the operation.
 Note: Overriding implementations of this method must be non-blocking.
onException in class AsynchronousProcessoreReason - the reason of failurepublic void onComplete()
AbstractAsynchronousProcessorInvocableMap's methods, this method is
 guaranteed to be called once and only once.
 Possible call back sequences are:
  cache.invoke
    ...
    onResult
    onComplete
  cache.invoke
    ...
    onException
    onComplete
  cache.invokeAll
    ...
     onResult
     onException
     onException
     onResult
     onComplete
 
 For ordering guarantees across processors see AbstractAsynchronousProcessor.getUnitOfOrderId().
 Note: Overriding implementations of this method must be non-blocking.
onComplete in class AsynchronousProcessorpublic int getUnitOfOrderId()
AbstractAsynchronousProcessor
 If two consecutive "invoke" calls are made using AsynchronousProcessors with the same order id and the same key set,
 then the corresponding execution and calls
 to AbstractAsynchronousProcessor.onResult(java.util.Map.Entry<K, R>) are going to happen in the exact same order.
 
 If two consecutive "invoke" calls are made using AsynchronousProcessors with the same order id and the same partition set,
 then the the corresponding execution and
 calls to AbstractAsynchronousProcessor.onComplete() are going to happen in the exact same order.
 
 Note 1: The ordering guarantee is respected between AsynchronousProcessors and AsynchronousAggregators with the same
 unit-of-order id.
 
 Note 2: There is no ordering guarantees between asynchronous and synchronous
 operations.
getUnitOfOrderId in class AbstractAsynchronousProcessorAbstractAsynchronousAggregator.getUnitOfOrderId(), 
AbstractAsynchronousProcessor.getUnitOfOrderId()public InvocableMap.EntryProcessor getProcessor()
AbstractAsynchronousProcessorgetProcessor in class AbstractAsynchronousProcessorpublic Object process(InvocableMap.Entry entry)
AbstractAsynchronousProcessorprocess in interface InvocableMap.EntryProcessorprocess in class AbstractAsynchronousProcessorentry - the Entry to processpublic Map processAll(Set setEntries)
AbstractAsynchronousProcessorprocessAll in interface InvocableMap.EntryProcessorprocessAll in class AbstractAsynchronousProcessorsetEntries - a Set of InvocableMap.Entry objects to processpublic void bind(FlowControl control)
AsynchronousAgentbind in class AsynchronousAgentcontrol - the underlying FlowControlpublic void flush()
FlowControlNote: this is a non-blocking call.
flush in interface FlowControlflush in class AsynchronousAgentpublic boolean checkBacklog(Continuation continueNormal)
FlowControltrue.
   checkBacklog in interface FlowControlcheckBacklog in class AsynchronousAgentcontinueNormal - (optional) Continuation to be called when
                        the backlog has been reduced back to normalpublic long drainBacklog(long cMillis)
FlowControldrainBacklog in interface FlowControldrainBacklog in class AsynchronousAgentcMillis - the maximum amount of time to wait (in milliseconds), or
                zero for infinite waitpublic boolean cancel(boolean mayInterruptIfRunning)
cancel in interface Futurecancel in class AsynchronousAgentpublic boolean isCancelled()
isCancelled in interface FutureisCancelled in class AsynchronousAgentpublic boolean isDone()
isDone in interface FutureisDone in class AsynchronousAgentpublic Object get() throws InterruptedException, ExecutionException
get in interface Futureget in class AsynchronousAgentInterruptedExceptionExecutionExceptionpublic Object get(long cTimeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
get in interface Futureget in class AsynchronousAgentInterruptedExceptionExecutionExceptionTimeoutExceptionpublic Object getResult()
AsynchronousAgentAsynchronousAgent.get() and re-throws checked exceptions
 as a RuntimeException.getResult in class AsynchronousAgentpublic Throwable getException()
AsynchronousAgentgetException in class AsynchronousAgentpublic boolean isCompletedExceptionally()
AsynchronousAgentisCompletedExceptionally in class AsynchronousAgentpublic CompletableFuture getCompletableFuture()
AsynchronousAgentgetCompletableFuture in class AsynchronousAgent