Search in sources :

Example 21 with EntryListener

use of com.hazelcast.core.EntryListener in project hazelcast by hazelcast.

the class MapPreconditionsTest method testAddLocalEntryListenerWithEntryListenerAndPredicate_NullListener.

@Test(expected = NullPointerException.class)
public void testAddLocalEntryListenerWithEntryListenerAndPredicate_NullListener() {
    EntryListener entryListener = null;
    Predicate predicate = new TruePredicate();
    map.addLocalEntryListener(entryListener, predicate, false);
}
Also used : TruePredicate(com.hazelcast.query.TruePredicate) EntryListener(com.hazelcast.core.EntryListener) TruePredicate(com.hazelcast.query.TruePredicate) Predicate(com.hazelcast.query.Predicate) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 22 with EntryListener

use of com.hazelcast.core.EntryListener in project hazelcast by hazelcast.

the class MapPreconditionsTest method testAddEntryListenerWithEntryListenerAndPredicateAndKey_NullPredicate.

@Test(expected = NullPointerException.class)
public void testAddEntryListenerWithEntryListenerAndPredicateAndKey_NullPredicate() {
    EntryListener entryListener = new TestEntryListener();
    Predicate predicate = null;
    map.addEntryListener(entryListener, predicate, null, true);
}
Also used : EntryListener(com.hazelcast.core.EntryListener) TruePredicate(com.hazelcast.query.TruePredicate) Predicate(com.hazelcast.query.Predicate) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 23 with EntryListener

use of com.hazelcast.core.EntryListener in project hazelcast by hazelcast.

the class MapPreconditionsTest method testAddLocalEntryListenerWithEntryListenerAndPredicateAndKey_NullListener.

@Test(expected = NullPointerException.class)
public void testAddLocalEntryListenerWithEntryListenerAndPredicateAndKey_NullListener() {
    EntryListener entryListener = null;
    Predicate predicate = new TruePredicate();
    map.addLocalEntryListener(entryListener, predicate, null, false);
}
Also used : TruePredicate(com.hazelcast.query.TruePredicate) EntryListener(com.hazelcast.core.EntryListener) TruePredicate(com.hazelcast.query.TruePredicate) Predicate(com.hazelcast.query.Predicate) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 24 with EntryListener

use of com.hazelcast.core.EntryListener in project hazelcast by hazelcast.

the class MapPreconditionsTest method testAddEntryListenerWithEntryListenerAndPredicateAndKey_NullListener.

@Test(expected = NullPointerException.class)
public void testAddEntryListenerWithEntryListenerAndPredicateAndKey_NullListener() {
    EntryListener entryListener = null;
    Predicate predicate = new TruePredicate();
    map.addEntryListener(entryListener, predicate, null, false);
}
Also used : TruePredicate(com.hazelcast.query.TruePredicate) EntryListener(com.hazelcast.core.EntryListener) TruePredicate(com.hazelcast.query.TruePredicate) Predicate(com.hazelcast.query.Predicate) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 25 with EntryListener

use of com.hazelcast.core.EntryListener in project hazelcast by hazelcast.

the class MapPreconditionsTest method testAddEntryListenerWithEntryListenerAndKey_NullListener.

@Test(expected = NullPointerException.class)
public void testAddEntryListenerWithEntryListenerAndKey_NullListener() throws Exception {
    EntryListener entryListener = null;
    Integer i = 3;
    map.addEntryListener(entryListener, i, false);
}
Also used : EntryListener(com.hazelcast.core.EntryListener) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

EntryListener (com.hazelcast.core.EntryListener)30 ParallelTest (com.hazelcast.test.annotation.ParallelTest)26 QuickTest (com.hazelcast.test.annotation.QuickTest)26 Test (org.junit.Test)26 Predicate (com.hazelcast.query.Predicate)16 TruePredicate (com.hazelcast.query.TruePredicate)16 EntryEvent (com.hazelcast.core.EntryEvent)4 CountDownLatch (java.util.concurrent.CountDownLatch)3 EntryAdapter (com.hazelcast.core.EntryAdapter)2 SqlPredicate (com.hazelcast.query.SqlPredicate)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)2 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)1 ReplicatedMapConfig (com.hazelcast.config.ReplicatedMapConfig)1 EntryEventType (com.hazelcast.core.EntryEventType)1 HazelcastException (com.hazelcast.core.HazelcastException)1 HazelcastInstanceAware (com.hazelcast.core.HazelcastInstanceAware)1 IMap (com.hazelcast.core.IMap)1 MapEvent (com.hazelcast.core.MapEvent)1