com.hazelcast.spi

## Class CallStatus

- java.lang.Object
- - com.hazelcast.spi.CallStatus

- Direct Known Subclasses:
    Offload

      public class CallStatus
      extends Object

  The result of an `Operation.call()`. Using the CallStatus the operation can control how the system will deal with the operation after it is executed. For example when the CallStatus is `DONE_RESPONSE`, a response can be send to the caller. But it also allows for different behavior where no response is available yet e.g. when an operation gets offloaded.

  # Future additions

  In the future we can add more values to this enumeration, for example 'YIELD' for batching operations that wants to release the operation thread so that other operations can be interleaved.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static CallStatus` | `DONE_RESPONSE` Signals that the Operation is done running and that a response is ready to be returned.
    `static int` | `DONE_RESPONSE_ORDINAL` The ordinal value for a `DONE_RESPONSE`.
    `static CallStatus` | `DONE_VOID` Signals that the Operation is done running, but no response will be returned.
    `static int` | `DONE_VOID_ORDINAL` The ordinal value for a `DONE_VOID`.
    `static int` | `OFFLOAD_ORDINAL` The ordinal value for an `Offload`.
    `static CallStatus` | `WAIT` Indicates that the call could not complete because waiting is required.
    `static int` | `WAIT_ORDINAL` The ordinal value for a `WAIT`.

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `CallStatus(int ordinal)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `ordinal()` Returns the ordinal value (useful for doing a switch case based on the type of CallStatus).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DONE_RESPONSE_ORDINAL

          public static final int DONE_RESPONSE_ORDINAL

      The ordinal value for a `DONE_RESPONSE`.
      See Also:
        Constant Field Values

    - #### DONE_VOID_ORDINAL

          public static final int DONE_VOID_ORDINAL

      The ordinal value for a `DONE_VOID`.
      See Also:
        Constant Field Values

    - #### WAIT_ORDINAL

          public static final int WAIT_ORDINAL

      The ordinal value for a `WAIT`.
      See Also:
        Constant Field Values

    - #### OFFLOAD_ORDINAL

          public static final int OFFLOAD_ORDINAL

      The ordinal value for an `Offload`.
      See Also:
        Constant Field Values

    - #### DONE_RESPONSE

          public static final CallStatus DONE_RESPONSE

      Signals that the Operation is done running and that a response is ready to be returned. Most of the normal operations like IAtomicLong.get will fall in this category.

    - #### DONE_VOID

          public static final CallStatus DONE_VOID

      Signals that the Operation is done running, but no response will be returned. Most of the regular operations like map.get will return a response, but there are also fire and forget operations (lot of cluster operations) that don't return a response.

    - #### WAIT

          public static final CallStatus WAIT

      Indicates that the call could not complete because waiting is required. E.g. a queue.take on an empty queue. This can only be returned by BlockingOperations.

  - ### Constructor Detail

    - #### CallStatus

          protected CallStatus(int ordinal)

  - ### Method Detail

    - #### ordinal

          public int ordinal()

      Returns the ordinal value (useful for doing a switch case based on the type of CallStatus).
      Returns:
        the ordinal value.

Copyright © 2020. All rights reserved.