use of com.hazelcast.spi.Operation in project hazelcast by hazelcast.
the class AtomicLongProxy method alterAndGetAsync.
@Override
public InternalCompletableFuture<Long> alterAndGetAsync(IFunction<Long, Long> function) {
isNotNull(function, "function");
Operation operation = new AlterAndGetOperation(name, function).setPartitionId(partitionId);
return invokeOnPartition(operation);
}
use of com.hazelcast.spi.Operation in project hazelcast by hazelcast.
the class AtomicLongProxy method alterAsync.
@Override
public InternalCompletableFuture<Void> alterAsync(IFunction<Long, Long> function) {
isNotNull(function, "function");
Operation operation = new AlterOperation(name, function).setPartitionId(partitionId);
return invokeOnPartition(operation);
}
use of com.hazelcast.spi.Operation in project hazelcast by hazelcast.
the class AtomicLongProxy method getAndAlterAsync.
@Override
public InternalCompletableFuture<Long> getAndAlterAsync(IFunction<Long, Long> function) {
isNotNull(function, "function");
Operation operation = new GetAndAlterOperation(name, function).setPartitionId(partitionId);
return invokeOnPartition(operation);
}
use of com.hazelcast.spi.Operation in project hazelcast by hazelcast.
the class CollectionTxnUtilTest method testBefore.
@Test
public void testBefore() throws Exception {
CollectionTxnUtil.before(operationList, wrapper);
for (Operation operation : operationList) {
TestOperation op = (TestOperation) operation;
assertTrue(op.beforeCalled);
assertEquals(remoteService, op.getService());
assertEquals(serviceName, op.getServiceName());
assertEquals(callerUuid, op.getCallerUuid());
assertEquals(nodeEngine, op.getNodeEngine());
assertEquals(partitionId, op.getPartitionId());
}
}
Aggregations