com.hazelcast.spi

## Interface CanCancelOperations

-     public interface CanCancelOperations

  Implemented by a service that can cancel its operations.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `cancelOperation(Address caller, long callId)` Notifies this service that an operation was requested to be cancelled.

- - ### Method Detail

    - #### cancelOperation

          boolean cancelOperation(Address caller,
                                  long callId)

      Notifies this service that an operation was requested to be cancelled. The caller is not aware which service an operation belongs to, therefore it may call this method with call IDs of unrelated operations. In such a case this method should simply return `false` and the caller will proceed to ask other services about it.

      Returning `true` consumes the cancellation signal only in this round of processing an Operation Control packet; the same signal will be re-sent with the next packet, until the operation is removed from the Invocation Registry. Therefore it is safe to return `true` whenever the service recognizes the call ID as one it's responsible for, whether or not it actually manages to cancel the operation now.

      Parameters:
        `caller` - address of the member which sent the operation
        `callId` - call ID of the operation
      Returns:
        `true` if the supplied call ID is known to this service; `false` otherwise.

Copyright © 2019. All rights reserved.