@Override public void unsubscribe(PubSubType type) { String name = type.toString(); Queue<String> regIds = map.remove(name); ITopic<Object> topic = hazelcastSub.getTopic(name); for (String id : regIds) { topic.removeMessageListener(id); } }
@Override public void stop() { isConsuming = false; if (topic != null) { topic.removeMessageListener(registrationId); } }
@Override public void close() { topic.removeMessageListener(subscription); } }
@Override public void close() { topic.removeMessageListener(subscription); } }
@Override public void close() { topic.removeMessageListener(subscription); } }
@Override public void stop() { isConsuming = false; if (topic != null) { topic.removeMessageListener(registrationId); } }
@Override public void close() { topic.removeMessageListener(subscription); } }
@Override public void stop(BundleContext context) throws Exception { topic.removeMessageListener(registrationId); }
@Override public boolean unsubscribe(EventHandler handler) { String listenerId = subscriptions.get(handler); if (listenerId != null) { return topic.removeMessageListener(listenerId); } return false; } }
@Override protected synchronized void doUnsubscribe(String eventName) { String id = registrations.remove(eventName); log.info("Unsubscribing from [{}] id [{}]", eventName, id); if (id != null) { ITopic<String> topic = hazelcast.getTopic(eventName); topic.removeMessageListener(id); toDelete.put(eventName, 0); } }
void destroy() { cluster.removeMembershipListener(membershipListenerId); topic.removeMessageListener(topicListenerId); }
void destroy() { cluster.removeMembershipListener(membershipListenerId); topic.removeMessageListener(topicListenerId); }
@Override public void close() { msgTopic.removeMessageListener(registrationId); queue.clear(); } }
@Override public void unsubscribe(PubSubType type) { String name = type.toString(); Queue<String> regIds = map.remove(name); ITopic<Object> topic = hazelcastSub.getTopic(name); for (String id : regIds) { topic.removeMessageListener(id); } }
private synchronized void removeMessageListener() { if (getAtmosphereResources().size() == 0 && messageListenerRegistrationId != null && getTopic() != null) { getTopic().removeMessageListener(messageListenerRegistrationId); messageListenerRegistrationId = null; logger.info("Removed message listener from topic"); } }
@Override protected void doStop() { if (this.distributedObject instanceof IMap) { ((IMap<?, ?>) this.distributedObject).removeEntryListener(getHazelcastRegisteredEventListenerId()); } else if (this.distributedObject instanceof MultiMap) { ((MultiMap<?, ?>) this.distributedObject).removeEntryListener(getHazelcastRegisteredEventListenerId()); } else if (this.distributedObject instanceof ReplicatedMap) { ((ReplicatedMap<?, ?>) this.distributedObject).removeEntryListener(getHazelcastRegisteredEventListenerId()); } else if (this.distributedObject instanceof IList) { ((IList<?>) this.distributedObject).removeItemListener(getHazelcastRegisteredEventListenerId()); } else if (this.distributedObject instanceof ISet) { ((ISet<?>) this.distributedObject).removeItemListener(getHazelcastRegisteredEventListenerId()); } else if (this.distributedObject instanceof IQueue) { ((IQueue<?>) this.distributedObject).removeItemListener(getHazelcastRegisteredEventListenerId()); } else if (this.distributedObject instanceof ITopic) { ((ITopic<?>) this.distributedObject).removeMessageListener(getHazelcastRegisteredEventListenerId()); } }