use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientLockProxy method lock.
@Override
public void lock(long leaseTime, TimeUnit timeUnit) {
checkPositive(leaseTime, "leaseTime should be positive");
ClientMessage request = LockLockCodec.encodeRequest(name, getTimeInMillis(leaseTime, timeUnit), ThreadUtil.getThreadId(), referenceIdGenerator.getNextReferenceId());
invokeOnPartition(request);
}
use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientMapProxy method removeAllInternal.
protected void removeAllInternal(Predicate predicate) {
ClientMessage request = MapRemoveAllCodec.encodeRequest(name, toData(predicate));
invoke(request);
}
use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientMapProxy method getInternal.
protected Object getInternal(Data keyData) {
ClientMessage request = MapGetCodec.encodeRequest(name, keyData, getThreadId());
ClientMessage response = invoke(request, keyData);
MapGetCodec.ResponseParameters resultParameters = MapGetCodec.decodeResponse(response);
return resultParameters.response;
}
use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientMapProxy method forceUnlock.
@Override
public void forceUnlock(K key) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
final Data keyData = toData(key);
ClientMessage request = MapForceUnlockCodec.encodeRequest(name, keyData, lockReferenceIdGenerator.getNextReferenceId());
invoke(request, keyData);
}
use of com.hazelcast.client.impl.protocol.ClientMessage in project hazelcast by hazelcast.
the class ClientMapProxy method size.
@Override
public int size() {
ClientMessage request = MapSizeCodec.encodeRequest(name);
ClientMessage response = invoke(request);
MapSizeCodec.ResponseParameters resultParameters = MapSizeCodec.decodeResponse(response);
return resultParameters.response;
}
Aggregations