use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientReplicatedMapProxy method containsValue.
@Override
public boolean containsValue(Object value) {
checkNotNull(value, NULL_KEY_IS_NOT_ALLOWED);
Data valueData = toData(value);
ClientMessage request = ReplicatedMapContainsValueCodec.encodeRequest(name, valueData);
ClientMessage response = invokeOnPartition(request, targetPartitionId);
ReplicatedMapContainsValueCodec.ResponseParameters result = ReplicatedMapContainsValueCodec.decodeResponse(response);
return result.response;
}
use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientReplicatedMapProxy method size.
@Override
public int size() {
ClientMessage request = ReplicatedMapSizeCodec.encodeRequest(name);
ClientMessage response = invokeOnPartition(request, targetPartitionId);
ReplicatedMapSizeCodec.ResponseParameters result = ReplicatedMapSizeCodec.decodeResponse(response);
return result.response;
}
use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientReplicatedMapProxy method addEntryListener.
@Override
public String addEntryListener(EntryListener<K, V> listener, Predicate<K, V> predicate, K key) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
final Data keyData = toData(key);
final Data predicateData = toData(predicate);
EventHandler<ClientMessage> handler = createHandler(listener);
return registerListener(createEntryListenerToKeyWithPredicateCodec(keyData, predicateData), handler);
}
use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientReplicatedMapProxy method remove.
@Override
public V remove(Object key) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
Data keyData = toData(key);
ClientMessage request = ReplicatedMapRemoveCodec.encodeRequest(name, keyData);
ClientMessage response = invoke(request, keyData);
ReplicatedMapRemoveCodec.ResponseParameters result = ReplicatedMapRemoveCodec.decodeResponse(response);
return toObject(result.response);
}
use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientReplicatedMapProxy method containsKey.
@Override
public boolean containsKey(Object key) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
Data keyData = toData(key);
ClientMessage request = ReplicatedMapContainsKeyCodec.encodeRequest(name, keyData);
ClientMessage response = invoke(request, keyData);
ReplicatedMapContainsKeyCodec.ResponseParameters result = ReplicatedMapContainsKeyCodec.decodeResponse(response);
return result.response;
}
Aggregations