use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.
the class MapClearExpiredOperation method isOwner.
private boolean isOwner() {
final NodeEngine nodeEngine = getNodeEngine();
final Address owner = nodeEngine.getPartitionService().getPartitionOwner(getPartitionId());
return nodeEngine.getThisAddress().equals(owner);
}
use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.
the class ConsumeAccumulatorOperation method isLocal.
private boolean isLocal() {
NodeEngine nodeEngine = getNodeEngine();
IPartitionService partitionService = nodeEngine.getPartitionService();
IPartition partition = partitionService.getPartition(getPartitionId());
return partition.isLocal();
}
use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.
the class MultiMapProxyImpl method get.
@Nonnull
@Override
public Collection<V> get(@Nonnull K key) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
NodeEngine nodeEngine = getNodeEngine();
Data dataKey = nodeEngine.toData(key);
MultiMapResponse result = getAllInternal(dataKey);
return result.getObjectCollection(nodeEngine);
}
use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.
the class MultiMapProxyImpl method values.
@Nonnull
@Override
public Collection<V> values() {
NodeEngine nodeEngine = getNodeEngine();
Map map = valuesInternal();
Collection values = new LinkedList();
for (Object obj : map.values()) {
if (obj == null) {
continue;
}
MultiMapResponse response = nodeEngine.toObject(obj);
values.addAll(response.getObjectCollection(nodeEngine));
}
return values;
}
use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.
the class MultiMapProxyImpl method remove.
@Nonnull
@Override
public Collection<V> remove(@Nonnull Object key) {
checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
NodeEngine nodeEngine = getNodeEngine();
Data dataKey = nodeEngine.toData(key);
MultiMapResponse result = removeInternal(dataKey);
return result.getObjectCollection(nodeEngine);
}
Aggregations