Java Code Examples for com.hazelcast.core.IList#removeItemListener()

The following examples show how to use com.hazelcast.core.IList#removeItemListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MessageServiceImpl.java    From java-11-examples with Apache License 2.0 5 votes vote down vote up
@Override
public void unSubscribe(MessageServiceSubscription messageServiceSubscription) {
    IList<String> messages = messageServiceCaches.get(messageServiceSubscription.getTopic());
    if (messages != null) {
        messages.removeItemListener(messageServiceSubscription.getId());
    }
}
 
Example 2
Source File: HazelcastDistributedListProvider.java    From attic-stratos with Apache License 2.0 5 votes vote down vote up
public void removeList(String name) {
    DistList list = listMap.get(name);
    if (list != null) {
        IList ilist = (IList) list;
        ilist.removeItemListener(list.getListenerId());
        listMap.remove(list);
        ilist.destroy();
    }
}