Search in sources :

Example 1 with CachePutIfAbsentCodec

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

the class ClientCacheProxySupport method doPutIfAbsentOnServer.

private InternalCompletableFuture<Boolean> doPutIfAbsentOnServer(Data keyData, Data valueData, Data expiryPolicyData, boolean withCompletionEvent) {
    int completionId = withCompletionEvent ? nextCompletionId() : -1;
    ClientMessage request = CachePutIfAbsentCodec.encodeRequest(nameWithPrefix, keyData, valueData, expiryPolicyData, completionId);
    ClientInvocationFuture future = invoke(request, keyData, completionId);
    return newDelegatingFuture(future, CachePutIfAbsentCodec::decodeResponse);
}
Also used : ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage) CachePutIfAbsentCodec(com.hazelcast.client.impl.protocol.codec.CachePutIfAbsentCodec) ClientInvocationFuture(com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)

Aggregations

ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)1 CachePutIfAbsentCodec (com.hazelcast.client.impl.protocol.codec.CachePutIfAbsentCodec)1 ClientInvocationFuture (com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)1