Search in sources :

Example 1 with CancelTaskOperation

use of com.hazelcast.scheduledexecutor.impl.operations.CancelTaskOperation in project hazelcast by hazelcast.

the class ScheduledFutureProxy method cancel.

@Override
public boolean cancel(boolean mayInterruptIfRunning) {
    if (mayInterruptIfRunning) {
        // inside the TaskRunner but it adds extra complexity.
        throw new UnsupportedOperationException("mayInterruptIfRunning flag is not supported.");
    }
    checkAccessibleHandler();
    checkAccessibleOwner();
    Operation op = new CancelTaskOperation(handler, false);
    return this.<Boolean>invoke(op).joinInternal();
}
Also used : CancelTaskOperation(com.hazelcast.scheduledexecutor.impl.operations.CancelTaskOperation) DisposeTaskOperation(com.hazelcast.scheduledexecutor.impl.operations.DisposeTaskOperation) GetResultOperation(com.hazelcast.scheduledexecutor.impl.operations.GetResultOperation) IsCanceledOperation(com.hazelcast.scheduledexecutor.impl.operations.IsCanceledOperation) Operation(com.hazelcast.spi.impl.operationservice.Operation) CancelTaskOperation(com.hazelcast.scheduledexecutor.impl.operations.CancelTaskOperation) GetStatisticsOperation(com.hazelcast.scheduledexecutor.impl.operations.GetStatisticsOperation) GetDelayOperation(com.hazelcast.scheduledexecutor.impl.operations.GetDelayOperation) IsDoneOperation(com.hazelcast.scheduledexecutor.impl.operations.IsDoneOperation)

Aggregations

CancelTaskOperation (com.hazelcast.scheduledexecutor.impl.operations.CancelTaskOperation)1 DisposeTaskOperation (com.hazelcast.scheduledexecutor.impl.operations.DisposeTaskOperation)1 GetDelayOperation (com.hazelcast.scheduledexecutor.impl.operations.GetDelayOperation)1 GetResultOperation (com.hazelcast.scheduledexecutor.impl.operations.GetResultOperation)1 GetStatisticsOperation (com.hazelcast.scheduledexecutor.impl.operations.GetStatisticsOperation)1 IsCanceledOperation (com.hazelcast.scheduledexecutor.impl.operations.IsCanceledOperation)1 IsDoneOperation (com.hazelcast.scheduledexecutor.impl.operations.IsDoneOperation)1 Operation (com.hazelcast.spi.impl.operationservice.Operation)1