Search in sources :

Example 1 with AtomicLongCompareAndSetCodec

use of com.hazelcast.client.impl.protocol.codec.AtomicLongCompareAndSetCodec in project hazelcast by hazelcast.

the class AtomicLongProxy method compareAndSetAsync.

@Override
public InternalCompletableFuture<Boolean> compareAndSetAsync(long expect, long update) {
    ClientMessage request = AtomicLongCompareAndSetCodec.encodeRequest(groupId, objectName, expect, update);
    ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
    return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicLongCompareAndSetCodec::decodeResponse);
}
Also used : ClientDelegatingFuture(com.hazelcast.client.impl.ClientDelegatingFuture) AtomicLongCompareAndSetCodec(com.hazelcast.client.impl.protocol.codec.AtomicLongCompareAndSetCodec) ClientInvocation(com.hazelcast.client.impl.spi.impl.ClientInvocation) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage) ClientInvocationFuture(com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)

Aggregations

ClientDelegatingFuture (com.hazelcast.client.impl.ClientDelegatingFuture)1 ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)1 AtomicLongCompareAndSetCodec (com.hazelcast.client.impl.protocol.codec.AtomicLongCompareAndSetCodec)1 ClientInvocation (com.hazelcast.client.impl.spi.impl.ClientInvocation)1 ClientInvocationFuture (com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)1