Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.net
Interface FlowControl

All Known Implementing Classes:
AsynchronousAgent, AsynchronousAggregator, AsynchronousProcessor

public interface FlowControl

Communication facilities that provide an asynchronous (non-blocking) way of submitting data exchange requests commonly implement mechanisms of modulating the control flow for underlying data transfer units (e.g. messages or packets). Those mechanism usually include some type of request buffering and backlog detection.

While in many cases it's desirable to automate the flow control algorithms, such automation may be sub-optimal (in a case of "auto-flush") or even completely objectionable (in a case of backlog-related delays if the caller is a part of an asynchronous communication flow by itself).

FlowControl represents a facet of a communication end point that allows clients to opt-out from an automatic flow control and manually govern the rate of the request flow.

Author:
gg/mf/rhl 2013.01.09

Method Summary
 boolean checkBacklog(com.oracle.common.base.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.

 

Method Detail

flush

void flush()
Ensure that any buffered asynchronous operations are dispatched to the underlying tier.

Note: this is a non-blocking call.


drainBacklog

long drainBacklog(long cMillis)
Check for an excessive backlog and allow blocking the calling thread for up to the specified amount of time.
Parameters:
cMillis - the maximum amount of time to wait (in milliseconds), or zero for infinite wait
Returns:
the remaining timeout or a negative value if timeout has occurred (the return of zero is only allowed for infinite timeout and indicates that the backlog is no longer excessive)

checkBacklog

boolean checkBacklog(com.oracle.common.base.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. It's important to remember that:
  1. The continuation could be called on any thread; concurrently with the calling thread or on the calling thread itself.
  2. The continuation is called if and only if this method returns true.
  3. The continuation must not make any blocking calls.
Parameters:
continueNormal - (optional) Continuation to be called when the backlog has been reduced back to normal
Returns:
true if the underlying communication channel is backlogged; false otherwise
Since:
Coherence 12.1.3

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.