Search in sources :

Example 1 with AtomicLongApplyCodec

use of com.hazelcast.client.impl.protocol.codec.AtomicLongApplyCodec 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);
}
Also used : ClientDelegatingFuture(com.hazelcast.client.impl.ClientDelegatingFuture) AtomicLongApplyCodec(com.hazelcast.client.impl.protocol.codec.AtomicLongApplyCodec) Data(com.hazelcast.internal.serialization.Data) ClientInvocation(com.hazelcast.client.impl.spi.impl.ClientInvocation) ClientMessage(com.hazelcast.client.impl.protocol.ClientMessage) ClientInvocationFuture(com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)

Aggregations

ClientDelegatingFuture (com.hazelcast.client.impl.ClientDelegatingFuture)1 ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)1 AtomicLongApplyCodec (com.hazelcast.client.impl.protocol.codec.AtomicLongApplyCodec)1 ClientInvocation (com.hazelcast.client.impl.spi.impl.ClientInvocation)1 ClientInvocationFuture (com.hazelcast.client.impl.spi.impl.ClientInvocationFuture)1 Data (com.hazelcast.internal.serialization.Data)1