use of com.hazelcast.client.impl.protocol.codec.AtomicRefCompareAndSetCodec in project hazelcast by hazelcast.
the class AtomicRefProxy method compareAndSetAsync.
@Override
public InternalCompletableFuture<Boolean> compareAndSetAsync(T expect, T update) {
Data expectedData = getContext().getSerializationService().toData(expect);
Data newData = getContext().getSerializationService().toData(update);
ClientMessage request = AtomicRefCompareAndSetCodec.encodeRequest(groupId, objectName, expectedData, newData);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicRefCompareAndSetCodec::decodeResponse);
}
Aggregations