use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapExecuteOnKeyMessageTask method prepareOperation.
@Override
protected Operation prepareOperation() {
EntryProcessor processor = serializationService.toObject(parameters.entryProcessor);
MapOperationProvider operationProvider = getMapOperationProvider(parameters.name);
MapOperation op = operationProvider.createEntryOperation(parameters.name, parameters.key, processor);
op.setThreadId(parameters.threadId);
return op;
}
use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapGetMessageTask method prepareOperation.
@Override
protected Operation prepareOperation() {
MapOperationProvider operationProvider = getMapOperationProvider(parameters.name);
MapOperation operation = operationProvider.createGetOperation(parameters.name, parameters.key);
operation.setThreadId(parameters.threadId);
return operation;
}
use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class AbstractMapQueryMessageTask method createInvocationsForMissingPartitions.
private void createInvocationsForMissingPartitions(PartitionIdSet missingPartitionsList, List<Future> futures, Predicate predicate) {
final OperationServiceImpl operationService = nodeEngine.getOperationService();
MapService mapService = nodeEngine.getService(getServiceName());
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
Query query = buildQuery(predicate);
PrimitiveIterator.OfInt missingPartitionIterator = missingPartitionsList.intIterator();
missingPartitionIterator.forEachRemaining((IntConsumer) partitionId -> {
MapOperation queryPartitionOperation = createQueryPartitionOperation(query, mapServiceContext);
queryPartitionOperation.setPartitionId(partitionId);
try {
Future future = operationService.invokeOnPartition(SERVICE_NAME, queryPartitionOperation, partitionId);
futures.add(future);
} catch (Throwable t) {
throw rethrow(t);
}
});
}
use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapPutIfAbsentMessageTask method prepareOperation.
protected Operation prepareOperation() {
MapOperationProvider operationProvider = getMapOperationProvider(parameters.name);
MapOperation op = operationProvider.createPutIfAbsentOperation(parameters.name, parameters.key, parameters.value, parameters.ttl, UNSET);
op.setThreadId(parameters.threadId);
return op;
}
use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapPutMessageTask method prepareOperation.
@Override
protected Operation prepareOperation() {
MapOperation op = newPutOperation(parameters.name, parameters.key, parameters.value, parameters.ttl);
op.setThreadId(parameters.threadId);
return op;
}
Aggregations