use of com.hazelcast.spi.NodeEngine in project hazelcast by hazelcast.
the class ObjectMultiMapProxy method lock.
@Override
public void lock(K key, long leaseTime, TimeUnit timeUnit) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
checkPositive(leaseTime, "leaseTime should be positive");
final NodeEngine nodeEngine = getNodeEngine();
Data dataKey = nodeEngine.toData(key);
lockSupport.lock(nodeEngine, dataKey, timeUnit.toMillis(leaseTime));
}
use of com.hazelcast.spi.NodeEngine in project hazelcast by hazelcast.
the class ObjectMultiMapProxy method toObjectSet.
private Set<K> toObjectSet(Set<Data> dataSet) {
final NodeEngine nodeEngine = getNodeEngine();
Set<K> keySet = new HashSet<K>(dataSet.size());
for (Data dataKey : dataSet) {
keySet.add((K) nodeEngine.toObject(dataKey));
}
return keySet;
}
use of com.hazelcast.spi.NodeEngine in project hazelcast by hazelcast.
the class ObjectMultiMapProxy method containsEntry.
@Override
public boolean containsEntry(K key, V value) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
checkNotNull(value, NULL_VALUE_IS_NOT_ALLOWED);
final NodeEngine nodeEngine = getNodeEngine();
Data dataKey = nodeEngine.toData(key);
Data valueKey = nodeEngine.toData(value);
return containsInternal(dataKey, valueKey);
}
use of com.hazelcast.spi.NodeEngine in project hazelcast by hazelcast.
the class ObjectMultiMapProxy method containsValue.
@Override
public boolean containsValue(Object value) {
checkNotNull(value, NULL_VALUE_IS_NOT_ALLOWED);
final NodeEngine nodeEngine = getNodeEngine();
Data valueKey = nodeEngine.toData(value);
return containsInternal(null, valueKey);
}
use of com.hazelcast.spi.NodeEngine in project hazelcast by hazelcast.
the class ObjectMultiMapProxy method lock.
@Override
public void lock(K key) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
final NodeEngine nodeEngine = getNodeEngine();
Data dataKey = nodeEngine.toData(key);
lockSupport.lock(nodeEngine, dataKey);
}
Aggregations