use of com.hazelcast.multimap.impl.MultiMapRecord in project hazelcast by hazelcast.
the class TransactionalMultiMapProxySupport method valueCountInternal.
protected int valueCountInternal(Data key) {
checkObjectNotNull(key);
Collection<MultiMapRecord> coll = txMap.get(key);
if (coll == null) {
CountOperation operation = new CountOperation(name, key);
operation.setThreadId(ThreadUtil.getThreadId());
try {
int partitionId = getNodeEngine().getPartitionService().getPartitionId(key);
final OperationService operationService = getNodeEngine().getOperationService();
Future<Integer> f = operationService.invokeOnPartition(MultiMapService.SERVICE_NAME, operation, partitionId);
return f.get();
} catch (Throwable t) {
throw ExceptionUtil.rethrow(t);
}
}
return coll.size();
}
Aggregations