List of usage examples for java.util.concurrent CopyOnWriteArraySet size
public int size()
From source file:de.taimos.dvalin.interconnect.core.spring.DaemonEvents.java
@SuppressWarnings("rawtypes") void emit(final IVO event) { if (this.listeners.containsKey(event.getClass())) { final CopyOnWriteArraySet<IDaemonEventListener> l = this.listeners.get(event.getClass()); if (l.size() != 0) { this.logger.info("Event " + event.getClass().getSimpleName()); }/* w w w .j a v a 2s .com*/ for (final IDaemonEventListener listener : l) { this.executor.execute(new Runnable() { @SuppressWarnings("unchecked") @Override public void run() { listener.onEvent(event); } }); } } }