use of com.hazelcast.core.EntryEvent in project hazelcast by hazelcast.
the class MultiMapListenerTest method testConfigListenerRegistration.
@Test
public void testConfigListenerRegistration() {
String name = "default";
final CountDownLatch latch = new CountDownLatch(1);
EntryListenerConfig entryListenerConfig = new EntryListenerConfig().setImplementation(new EntryAdapter() {
public void entryAdded(EntryEvent event) {
latch.countDown();
}
});
Config config = new Config();
config.getMultiMapConfig(name).addEntryListenerConfig(entryListenerConfig);
HazelcastInstance hz = createHazelcastInstance(config);
hz.getMultiMap(name).put(1, 1);
assertOpenEventually(latch);
}
Aggregations