throw new NullPointerException("Predicate should not be null!");
}
if (predicate instanceof PagingPredicate) {
throw new NullPointerException("Paging is not supported for Transactional queries!");
}
final MapService service = getService();
final QueryResultSet queryResultSet = (QueryResultSet) queryInternal(predicate, IterationType.KEY, false);
final Set<Object> keySet = new HashSet<Object>(queryResultSet); //todo: Can't we just use the original set?
for (final Map.Entry<Object, TxnValueWrapper> entry : txMap.entrySet()) {
if (!TxnValueWrapper.Type.REMOVED.equals(entry.getValue().type)) {
final Object value = entry.getValue().value instanceof Data ?
service.toObject(entry.getValue().value) : entry.getValue().value;
final QueryEntry queryEntry = new QueryEntry(null, service.toData(entry.getKey()), entry.getKey(), value);
// apply predicate on txMap.
if (predicate.apply(queryEntry)) {
keySet.add(entry.getKey());
}
} else {