Interface InvocableInOrder

All Superinterfaces:
Invocable, Runnable, Serializable
All Known Implementing Classes:
AbstractInvocable

public interface InvocableInOrder extends Invocable
The InvocableInOrder interface allows to control the ordering in which the results of Invocable tasks are returned back to the caller by the Invocation service with a thread pool.

Consider the following scenario. Cluster node A executes two asynchronous queries Q1 and Q2 calling execute. Both queries are to be executed on a cluster node B; Q2 is called after Q1 and therefore received by the InvocationService on the node B in that order.

If the Invocation service is configured to use a thread pool of more than one thread and the processing time of Q1 is significantly longer then the processing time of Q2, then the result of Q2 execution will be returned to the caller ahead of the response for Q1.

If a client application semantics require "in order" response guarantees, the corresponding Invocable tasks will have to implement InvocableInOrder interface and return "true" from isRespondInOrder() method.

Since:
Coherence 2.2
Author:
gg 2003-06-12
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine whether this Invocable object has to preserve the order of responses according to the order of requests.

    Methods inherited from interface com.tangosol.net.Invocable

    getResult, init, run
  • Method Details

    • isRespondInOrder

      boolean isRespondInOrder()
      Determine whether this Invocable object has to preserve the order of responses according to the order of requests.
      Returns:
      true if the response order must be preserved; false otherwise