Example usage for java.util.concurrent ConcurrentLinkedQueue notifyAll

List of usage examples for java.util.concurrent ConcurrentLinkedQueue notifyAll

Introduction

In this page you can find the example usage for java.util.concurrent ConcurrentLinkedQueue notifyAll.

Prototype

@HotSpotIntrinsicCandidate
public final native void notifyAll();

Source Link

Document

Wakes up all threads that are waiting on this object's monitor.

Usage

From source file:net.jmhertlein.mcanalytics.plugin.daemon.ClientMonitor.java

public synchronized void close() throws IOException {
    if (!shutdown) {
        shutdown = true;// ww  w.j  a  va 2 s  .c  om
        out.close();
        in.close();
        client.close();
        ConcurrentLinkedQueue<JSONObject> writeQueue = this.dispatcher.getWriteQueue();
        synchronized (writeQueue) {
            writeQueue.notifyAll();
        }
        //System.out.println("Client: All closed!");
    }
}