use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapProxySupport method removeInternal.
protected Data removeInternal(Object key) {
Data keyData = toDataWithStrategy(key);
MapOperation operation = operationProvider.createRemoveOperation(name, keyData);
return (Data) invokeOperation(keyData, operation);
}
use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapProxySupport method putIfAbsentAsyncInternal.
protected InternalCompletableFuture<Data> putIfAbsentAsyncInternal(Object key, Data value, long ttl, TimeUnit ttlUnit, long maxIdle, TimeUnit maxIdleUnit) {
Data keyData = toDataWithStrategy(key);
int partitionId = partitionService.getPartitionId(key);
MapOperation operation = newPutIfAbsentOperation(keyData, value, ttl, ttlUnit, maxIdle, maxIdleUnit);
operation.setThreadId(getThreadId());
try {
long startTimeNanos = Timer.nanos();
InvocationFuture<Data> future = operationService.invokeOnPartitionAsync(SERVICE_NAME, operation, partitionId);
if (statisticsEnabled) {
future.whenCompleteAsync(new IncrementStatsExecutionCallback<>(operation, startTimeNanos), CALLER_RUNS);
}
return future;
} catch (Throwable t) {
throw rethrow(t);
}
}
use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapPutTransientWithMaxIdleMessageTask method prepareOperation.
protected Operation prepareOperation() {
MapOperationProvider operationProvider = getMapOperationProvider(parameters.name);
MapOperation op = operationProvider.createPutTransientOperation(parameters.name, parameters.key, parameters.value, parameters.ttl, parameters.maxIdle);
op.setThreadId(parameters.threadId);
return op;
}
use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapPutWithMaxIdleMessageTask method prepareOperation.
protected Operation prepareOperation() {
MapOperationProvider operationProvider = getMapOperationProvider(parameters.name);
MapOperation op = operationProvider.createPutOperation(parameters.name, parameters.key, parameters.value, parameters.ttl, parameters.maxIdle);
op.setThreadId(parameters.threadId);
return op;
}
use of com.hazelcast.map.impl.operation.MapOperation in project hazelcast by hazelcast.
the class MapReplaceIfSameMessageTask method prepareOperation.
@Override
protected Operation prepareOperation() {
MapOperationProvider operationProvider = getMapOperationProvider(parameters.name);
MapOperation op = operationProvider.createReplaceIfSameOperation(parameters.name, parameters.key, parameters.testValue, parameters.value);
op.setThreadId(parameters.threadId);
return op;
}
Aggregations