use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class AtomicRefProxy method containsAsync.
@Override
public InternalCompletableFuture<Boolean> containsAsync(T expected) {
Data data = getContext().getSerializationService().toData(expected);
ClientMessage request = AtomicRefContainsCodec.encodeRequest(groupId, objectName, data);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicRefContainsCodec::decodeResponse);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture 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.spi.impl.ClientInvocationFuture 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);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class AtomicRefProxy method compareAndSetAsync.
@Override
public InternalCompletableFuture<Boolean> compareAndSetAsync(T expect, T update) {
Data expectedData = getContext().getSerializationService().toData(expect);
Data newData = getContext().getSerializationService().toData(update);
ClientMessage request = AtomicRefCompareAndSetCodec.encodeRequest(groupId, objectName, expectedData, newData);
ClientInvocationFuture future = new ClientInvocation(getClient(), request, name).invoke();
return new ClientDelegatingFuture<>(future, getSerializationService(), AtomicRefCompareAndSetCodec::decodeResponse);
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocationFuture in project hazelcast by hazelcast.
the class ClientProxySessionManager method closeSession.
@Override
protected InternalCompletableFuture<Object> closeSession(RaftGroupId groupId, Long sessionId) {
ClientMessage request = CPSessionCloseSessionCodec.encodeRequest(groupId, sessionId);
ClientInvocationFuture future = new ClientInvocation(client, request, "sessionManager").invoke();
return new ClientDelegatingFuture<>(future, client.getSerializationService(), CPSessionCloseSessionCodec::decodeResponse);
}
Aggregations