use of com.hazelcast.client.impl.spi.impl.ClientInvocation 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.ClientInvocation in project hazelcast by hazelcast.
the class AtomicRefProxy method onDestroy.
@Override
public void onDestroy() {
ClientMessage request = CPGroupDestroyCPObjectCodec.encodeRequest(groupId, getServiceName(), objectName);
new ClientInvocation(getClient(), request, name).invoke().joinInternal();
}
use of com.hazelcast.client.impl.spi.impl.ClientInvocation 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.ClientInvocation 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.ClientInvocation 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);
}
Aggregations