use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class BasicRecordStoreLoader method sendOperation.
/**
* Invokes an operation to put the provided key-value pairs to the partition
* record store.
*
* @param loadingSequence the list of serialised key-value-(expirationTime)
* sequences
* @return the future representing the pending completion of the put operation
*/
private Future<?> sendOperation(List<Data> loadingSequence) {
OperationService operationService = mapServiceContext.getNodeEngine().getOperationService();
NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
Operation operation = createOperation(loadingSequence);
operation.setNodeEngine(nodeEngine);
operation.setPartitionId(partitionId);
OperationAccessor.setCallerAddress(operation, nodeEngine.getThisAddress());
operation.setCallerUuid(nodeEngine.getLocalMember().getUuid());
operation.setServiceName(MapService.SERVICE_NAME);
return operationService.invokeOnPartition(MapService.SERVICE_NAME, operation, partitionId);
}
use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class PublisherCreateOperation method readAndResetAccumulator.
/**
* Read and reset the accumulator of query cache inside the given partition.
*/
private Future<Object> readAndResetAccumulator(String mapName, String cacheId, Integer partitionId) {
Operation operation = new ReadAndResetAccumulatorOperation(mapName, cacheId);
OperationService operationService = getNodeEngine().getOperationService();
return operationService.invokeOnPartition(MapService.SERVICE_NAME, operation, partitionId);
}
use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class NodeQueryCacheEndToEndConstructor method madePublishable.
private void madePublishable(String mapName, String cacheId) {
InvokerWrapper invokerWrapper = context.getInvokerWrapper();
Collection<Member> memberList = context.getMemberList();
List<Future> futures = new ArrayList<>(memberList.size());
for (Member member : memberList) {
Operation operation = new MadePublishableOperation(mapName, cacheId);
Future future = invokerWrapper.invokeOnTarget(operation, member);
futures.add(future);
}
waitWithDeadline(futures, OPERATION_WAIT_TIMEOUT_MINUTES, MINUTES);
}
use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class TxnCommitOperation method run.
@Override
public void run() throws Exception {
for (Operation op : opList) {
op.setNodeEngine(getNodeEngine()).setServiceName(getServiceName()).setPartitionId(getPartitionId());
runDirect(op);
}
getOrCreateContainer().unlock(dataKey, getCallerUuid(), threadId, getCallId());
}
use of com.hazelcast.spi.impl.operationservice.Operation in project hazelcast by hazelcast.
the class MultiMapTransactionLogRecord method writeData.
@Override
public void writeData(ObjectDataOutput out) throws IOException {
out.writeString(name);
out.writeInt(partitionId);
out.writeInt(opList.size());
for (Operation op : opList) {
out.writeObject(op);
}
IOUtil.writeData(out, key);
out.writeLong(ttl);
out.writeLong(threadId);
}
Aggregations