List of usage examples for java.util.concurrent ConcurrentLinkedQueue contains
public boolean contains(Object o)
From source file:com.clican.pluto.cluster.base.BaseMessageDispatcher.java
public synchronized void unbind(String msgName, IMessageHandler handler) { if (StringUtils.isEmpty(msgName) || handler == null) { throw new IllegalArgumentException("The message name and message handler can't be null"); }/*from ww w.j av a 2 s .co m*/ ConcurrentLinkedQueue<IMessageHandler> handlerQueue = messageHandlerMapping.get(msgName); if (handlerQueue == null || !handlerQueue.contains(handler)) { log.warn("The message handler [" + handler + "] is not binded by [" + msgName + "]"); } handlerQueue.remove(handler); }