Search in sources :

Example 26 with MapListener

use of com.hazelcast.map.listener.MapListener in project hazelcast by hazelcast.

the class MapPreconditionsTest method testAddEntryListenerWithMapListenerAndKey_NullKey.

@Test(expected = NullPointerException.class)
public void testAddEntryListenerWithMapListenerAndKey_NullKey() {
    MapListener mapListener = new MapListenerAdapter() {

        public void onEntryEvent(EntryEvent event) {
            System.out.println("-");
        }
    };
    map.addEntryListener(mapListener, null, false);
}
Also used : MapListener(com.hazelcast.map.listener.MapListener) MapListenerAdapter(com.hazelcast.map.impl.MapListenerAdapter) EntryEvent(com.hazelcast.core.EntryEvent) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 27 with MapListener

use of com.hazelcast.map.listener.MapListener in project hazelcast by hazelcast.

the class MapPreconditionsTest method testAddEntryListenerWithMapListenerAndPredicateAndKey_NullListener.

@Test(expected = NullPointerException.class)
public void testAddEntryListenerWithMapListenerAndPredicateAndKey_NullListener() {
    MapListener mapListener = null;
    Predicate predicate = new TruePredicate();
    map.addEntryListener(mapListener, predicate, null, true);
}
Also used : MapListener(com.hazelcast.map.listener.MapListener) TruePredicate(com.hazelcast.query.TruePredicate) 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)

Aggregations

MapListener (com.hazelcast.map.listener.MapListener)27 ParallelTest (com.hazelcast.test.annotation.ParallelTest)24 QuickTest (com.hazelcast.test.annotation.QuickTest)24 Test (org.junit.Test)24 Predicate (com.hazelcast.query.Predicate)16 TruePredicate (com.hazelcast.query.TruePredicate)16 EntryEvent (com.hazelcast.core.EntryEvent)10 MapListenerAdapter (com.hazelcast.map.impl.MapListenerAdapter)10 Config (com.hazelcast.config.Config)1 EntryListenerConfig (com.hazelcast.config.EntryListenerConfig)1 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 EntryEventFilter (com.hazelcast.map.impl.EntryEventFilter)1 QueryCacheEventService (com.hazelcast.map.impl.querycache.QueryCacheEventService)1 SqlPredicate (com.hazelcast.query.SqlPredicate)1 EventFilter (com.hazelcast.spi.EventFilter)1