use of com.hazelcast.client.impl.protocol.codec.AtomicRefApplyCodec in project hazelcast by hazelcast.
the class AtomicRefProxy method invokeApply.
private <T2, T3> InternalCompletableFuture<T3> invokeApply(IFunction<T, T2> function, ReturnValueType returnValueType, boolean alter) {
checkTrue(function != null, "Function cannot be null");
Data data = getContext().getSerializationService().toData(function);
ClientMessage request = AtomicRefApplyCodec.encodeRequest(groupId, objectName, data, returnValueType.value(), alter);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicRefApplyCodec::decodeResponse);
}
Aggregations