use of com.hazelcast.query.Predicate in project hazelcast by hazelcast.
the class MapPreconditionsTest method testAddLocalEntryListenerWithMapListenerAndPredicate_NullListener.
@Test(expected = UnsupportedOperationException.class)
public void testAddLocalEntryListenerWithMapListenerAndPredicate_NullListener() throws Exception {
MapListener mapListener = null;
Predicate predicate = new TruePredicate();
map.addLocalEntryListener(mapListener, predicate, false);
}
use of com.hazelcast.query.Predicate in project hazelcast by hazelcast.
the class MapPreconditionsTest method testAddEntryListenerWithEntryListenerAndPredicateAndKey_NullPredicate.
@Test(expected = NullPointerException.class)
public void testAddEntryListenerWithEntryListenerAndPredicateAndKey_NullPredicate() throws Exception {
EntryListener entryListener = new TestEntryListener();
Predicate predicate = null;
map.addEntryListener(entryListener, predicate, null, true);
}
use of com.hazelcast.query.Predicate in project hazelcast by hazelcast.
the class MapPreconditionsTest method testAddEntryListenerWithMapListenerAndPredicateAndKey_NullListener.
@Test(expected = NullPointerException.class)
public void testAddEntryListenerWithMapListenerAndPredicateAndKey_NullListener() throws Exception {
MapListener mapListener = null;
Predicate predicate = new TruePredicate();
map.addEntryListener(mapListener, predicate, null, true);
}
use of com.hazelcast.query.Predicate in project hazelcast by hazelcast.
the class MapPreconditionsTest method testAddLocalEntryListenerWithMapListenerAndPredicateAndKey_NullListener.
@Test(expected = UnsupportedOperationException.class)
public void testAddLocalEntryListenerWithMapListenerAndPredicateAndKey_NullListener() throws Exception {
MapListener mapListener = null;
Predicate predicate = new TruePredicate();
map.addLocalEntryListener(mapListener, predicate, null, false);
}
use of com.hazelcast.query.Predicate in project hazelcast by hazelcast.
the class TransactionalMapValuesWithPredicateMessageTask method innerCall.
@Override
protected Object innerCall() throws Exception {
final TransactionContext context = getEndpoint().getTransactionContext(parameters.txnId);
final TransactionalMap map = context.getMap(parameters.name);
Predicate predicate = serializationService.toObject(parameters.predicate);
Collection values = map.values(predicate);
List<Data> list = new ArrayList<Data>(values.size());
for (Object o : values) {
list.add(serializationService.toData(o));
}
return list;
}
Aggregations