Search in sources :

Example 1 with RemoveOperation

use of com.hazelcast.replicatedmap.impl.operation.RemoveOperation in project hazelcast by hazelcast.

the class ReplicatedMapProxy method remove.

@Override
public V remove(Object key) {
    isNotNull(key, "key");
    Data dataKey = nodeEngine.toData(key);
    int partitionId = partitionService.getPartitionId(key);
    RemoveOperation removeOperation = new RemoveOperation(getName(), dataKey);
    InternalCompletableFuture<Object> future = getOperationService().invokeOnPartition(getServiceName(), removeOperation, partitionId);
    VersionResponsePair result = (VersionResponsePair) future.join();
    return nodeEngine.toObject(result.getResponse());
}
Also used : RemoveOperation(com.hazelcast.replicatedmap.impl.operation.RemoveOperation) Data(com.hazelcast.nio.serialization.Data) AbstractDistributedObject(com.hazelcast.spi.AbstractDistributedObject) InitializingObject(com.hazelcast.spi.InitializingObject) VersionResponsePair(com.hazelcast.replicatedmap.impl.operation.VersionResponsePair)

Aggregations

Data (com.hazelcast.nio.serialization.Data)1 RemoveOperation (com.hazelcast.replicatedmap.impl.operation.RemoveOperation)1 VersionResponsePair (com.hazelcast.replicatedmap.impl.operation.VersionResponsePair)1 AbstractDistributedObject (com.hazelcast.spi.AbstractDistributedObject)1 InitializingObject (com.hazelcast.spi.InitializingObject)1