Search in sources :

Example 1 with AtomicRefContainsCodec

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

the class AtomicRefProxy method containsAsync.

@Override
public InternalCompletableFuture<Boolean> containsAsync(T expected) {
    Data data = getContext().getSerializationService().toData(expected);
    ClientMessage request = AtomicRefContainsCodec.encodeRequest(groupId, objectName, data);
    ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
    return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicRefContainsCodec::decodeResponse);
}
Also used : AtomicRefContainsCodec(com.hazelcast.client.impl.protocol.codec.AtomicRefContainsCodec) ClientDelegatingFuture(com.hazelcast.client.impl.ClientDelegatingFuture) Data(com.hazelcast.internal.serialization.Data) 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 AtomicRefContainsCodec (com.hazelcast.client.impl.protocol.codec.AtomicRefContainsCodec)1 ClientInvocation (com.hazelcast.client.impl.spi.impl.ClientInvocation)1 ClientInvocationFuture (com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)1 Data (com.hazelcast.internal.serialization.Data)1