Search in sources :

Example 1 with CacheGetCodec

use of com.hazelcast.client.impl.protocol.codec.CacheGetCodec in project hazelcast by hazelcast.

the class ClientCacheProxySupport method getInternal.

private ClientDelegatingFuture<V> getInternal(Data keyData, ExpiryPolicy expiryPolicy, boolean deserializeResponse) {
    Data expiryPolicyData = toData(expiryPolicy);
    ClientMessage request = CacheGetCodec.encodeRequest(nameWithPrefix, keyData, expiryPolicyData);
    int partitionId = getContext().getPartitionService().getPartitionId(keyData);
    ClientInvocation clientInvocation = new ClientInvocation(getClient(), request, name, partitionId);
    ClientInvocationFuture future = clientInvocation.invoke();
    return newDelegatingFuture(future, CacheGetCodec::decodeResponse, deserializeResponse);
}
Also used : CacheGetCodec(com.hazelcast.client.impl.protocol.codec.CacheGetCodec) 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

ClientMessage (com.hazelcast.client.impl.protocol.ClientMessage)1 CacheGetCodec (com.hazelcast.client.impl.protocol.codec.CacheGetCodec)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