Search in sources :

Example 6 with EntryListener

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

the class MapPreconditionsTest method testAddLocalEntryListenerWithEntryListener.

@Test(expected = UnsupportedOperationException.class)
public void testAddLocalEntryListenerWithEntryListener() throws Exception {
    EntryListener entryListener = null;
    map.addLocalEntryListener(entryListener);
}
Also used : EntryListener(com.hazelcast.core.EntryListener) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 7 with EntryListener

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

the class MapPreconditionsTest method testAddLocalEntryListenerWithEntryListenerAndPredicateAndKey_NullListener.

@Test(expected = UnsupportedOperationException.class)
public void testAddLocalEntryListenerWithEntryListenerAndPredicateAndKey_NullListener() throws Exception {
    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) Predicate(com.hazelcast.query.Predicate) TruePredicate(com.hazelcast.query.TruePredicate) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Example 8 with EntryListener

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

the class MapPreconditionsTest method testAddEntryListenerWithEntryListenerAndPredicate_NullPredicate.

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

Example 9 with EntryListener

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

the class MapPreconditionsTest method testAddLocalEntryListenerWithEntryListenerAndPredicate_NullPredicate.

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

Example 10 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() throws Exception {
    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) Predicate(com.hazelcast.query.Predicate) TruePredicate(com.hazelcast.query.TruePredicate) 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