use of com.hazelcast.client.impl.protocol.codec.CacheReplaceCodec in project hazelcast by hazelcast.
the class ClientCacheProxySupport method doReplaceOnServer.
private CompletableFuture<Boolean> doReplaceOnServer(Data keyData, Data newValueData, Data oldValueData, Data expiryPolicyData, boolean withCompletionEvent, BiConsumer<Boolean, Throwable> statsCallback) {
int completionId = withCompletionEvent ? nextCompletionId() : -1;
ClientMessage request = CacheReplaceCodec.encodeRequest(nameWithPrefix, keyData, oldValueData, newValueData, expiryPolicyData, completionId);
ClientDelegatingFuture<Boolean> delegatingFuture = newDelegatingFuture(invoke(request, keyData, completionId), CacheReplaceCodec::decodeResponse);
return addCallback(delegatingFuture, statsCallback);
}
Aggregations