use of com.hazelcast.client.impl.protocol.codec.AtomicRefSetCodec in project hazelcast by hazelcast.
the class AtomicRefProxy method getAndSetAsync.
@Override
public InternalCompletableFuture<T> getAndSetAsync(T newValue) {
Data data = getContext().getSerializationService().toData(newValue);
ClientMessage request = AtomicRefSetCodec.encodeRequest(groupId, objectName, data, true);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicRefSetCodec::decodeResponse);
}
use of com.hazelcast.client.impl.protocol.codec.AtomicRefSetCodec in project hazelcast by hazelcast.
the class AtomicRefProxy method setAsync.
@Override
public InternalCompletableFuture<Void> setAsync(T newValue) {
Data data = getContext().getSerializationService().toData(newValue);
ClientMessage request = AtomicRefSetCodec.encodeRequest(groupId, objectName, data, false);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicRefSetCodec::decodeResponse);
}
Aggregations