if (predicate == null) {
throw new NullPointerException("Predicate should not be null!");
}
final TxnMapRequest request = new TxnMapRequest(getName(),
TxnMapRequest.TxnMapRequestType.KEYSET_BY_PREDICATE, predicate);
final MapKeySet result = invoke(request);
final Set<Data> dataKeySet = result.getKeySet();
final HashSet<K> keySet = new HashSet<K>(dataKeySet.size());
for (Data data : dataKeySet) {
keySet.add((K) toObject(data));
}
return keySet;