Search in sources :

Example 1 with AtomicLongGetAndSetCodec

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

the class AtomicLongProxy method getAndSetAsync.

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

Aggregations

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