Search in sources :

Example 1 with CachePutCodec

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

the class ClientCacheProxySupport method callPutSync.

protected V callPutSync(K key, Data keyData, V value, Data valueData, Data expiryPolicyData, boolean isGet) throws InterruptedException, ExecutionException {
    ClientInvocationFuture invocationFuture = putInternal(keyData, valueData, expiryPolicyData, isGet, true);
    ClientDelegatingFuture<V> delegatingFuture = newDelegatingFuture(invocationFuture, CachePutCodec::decodeResponse);
    return delegatingFuture.get();
}
Also used : CachePutCodec(com.hazelcast.client.impl.protocol.codec.CachePutCodec) ClientInvocationFuture(com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)

Example 2 with CachePutCodec

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

the class ClientCacheProxySupport method callPutAsync.

protected CompletableFuture callPutAsync(K key, Data keyData, V value, Data valueData, Data expiryPolicyData, boolean isGet, boolean withCompletionEvent, BiConsumer<V, Throwable> statsCallback) {
    ClientInvocationFuture invocationFuture = putInternal(keyData, valueData, expiryPolicyData, isGet, withCompletionEvent);
    InternalCompletableFuture future = newDelegatingFuture(invocationFuture, CachePutCodec::decodeResponse);
    return addCallback(future, statsCallback);
}
Also used : InternalCompletableFuture(com.hazelcast.spi.impl.InternalCompletableFuture) CachePutCodec(com.hazelcast.client.impl.protocol.codec.CachePutCodec) ClientInvocationFuture(com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)

Aggregations

CachePutCodec (com.hazelcast.client.impl.protocol.codec.CachePutCodec)2 ClientInvocationFuture (com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)2 InternalCompletableFuture (com.hazelcast.spi.impl.InternalCompletableFuture)1