use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class AtomicLongProxy method getAndAlterAsync.
@Override
public InternalCompletableFuture<Long> getAndAlterAsync(IFunction<Long, Long> function) {
Data f = getSerializationService().toData(function);
ClientMessage request = AtomicLongAlterCodec.encodeRequest(groupId, objectName, f, OLD_VALUE.value());
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicLongAlterCodec::decodeResponse);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class AtomicLongProxy method applyAsync.
@Override
public <R> InternalCompletableFuture<R> applyAsync(IFunction<Long, R> function) {
Data f = getSerializationService().toData(function);
ClientMessage request = AtomicLongApplyCodec.encodeRequest(groupId, objectName, f);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicLongApplyCodec::decodeResponse);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class AtomicLongProxy method getAsync.
@Override
public InternalCompletableFuture<Long> getAsync() {
ClientMessage request = AtomicLongGetCodec.encodeRequest(groupId, objectName);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicLongGetCodec::decodeResponse);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class AtomicLongProxy method alterAndGetAsync.
@Override
public InternalCompletableFuture<Long> alterAndGetAsync(IFunction<Long, Long> function) {
Data f = getSerializationService().toData(function);
ClientMessage request = AtomicLongAlterCodec.encodeRequest(groupId, objectName, f, NEW_VALUE.value());
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicLongAlterCodec::decodeResponse);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class AtomicRefProxy method getAsync.
@Override
public InternalCompletableFuture<T> getAsync() {
ClientMessage request = AtomicRefGetCodec.encodeRequest(groupId, objectName);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicRefGetCodec::decodeResponse);
}
Aggregations