use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class CardinalityEstimatorProxy method addAsync.
@Override
public InvocationFuture<Void> addAsync(@Nonnull Object obj) {
checkNotNull(obj, "Object must not be null");
Data data = getNodeEngine().getSerializationService().toData(obj);
Operation operation = new AggregateOperation(name, data.hash64()).setPartitionId(partitionId);
return invokeOnPartition(operation);
}
use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class CollectionTxnUtil method before.
public static void before(List<Operation> operationList, Operation wrapper) throws Exception {
for (Operation operation : operationList) {
operation.setService(wrapper.getService());
operation.setServiceName(wrapper.getServiceName());
operation.setCallerUuid(wrapper.getCallerUuid());
operation.setNodeEngine(wrapper.getNodeEngine());
operation.setPartitionId(wrapper.getPartitionId());
operation.beforeRun();
}
}
use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class CollectionService method rollbackTransaction.
@Override
public void rollbackTransaction(UUID transactionId) {
final Set<String> collectionNames = getContainerMap().keySet();
OperationService operationService = nodeEngine.getOperationService();
for (String name : collectionNames) {
int partitionId = partitionService.getPartitionId(StringPartitioningStrategy.getPartitionKey(name));
Operation operation = new CollectionTransactionRollbackOperation(name, transactionId).setPartitionId(partitionId).setService(this).setNodeEngine(nodeEngine);
operationService.invokeOnPartition(operation);
}
}
use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class DurableExecutorServiceProxy method disposeResult.
@Override
public void disposeResult(long uniqueId) {
int partitionId = Bits.extractInt(uniqueId, false);
int sequence = Bits.extractInt(uniqueId, true);
Operation op = new DisposeResultOperation(name, sequence).setPartitionId(partitionId);
InternalCompletableFuture<?> future = invokeOnPartition(op);
future.joinInternal();
}
use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class DurableExecutorServiceProxy method retrieveAndDisposeResult.
@Override
public <T> Future<T> retrieveAndDisposeResult(long uniqueId) {
int partitionId = Bits.extractInt(uniqueId, false);
int sequence = Bits.extractInt(uniqueId, true);
Operation op = new RetrieveAndDisposeResultOperation(name, sequence).setPartitionId(partitionId);
return invokeOnPartition(op);
}
Aggregations