src/main/java/com/paul/design/Observer/BlockQueue.java
public synchronized void put(String content) throws InterruptedException {
        while (queue.size()==maxSize){
            this.wait();
        }
        System.out.println(" blockQueue put ,value : "+content);
        queue.add(content);
        notifyAll();
    }
/**
     * Inserts the specified element into this queue, waiting if necessary
     * for space to become available.
     *
     * @param e the element to add
     * @throws InterruptedException if interrupted while waiting
     * @throws ClassCastException if the class of the specified element
     *         prevents it from being added to this queue
     * @throws NullPointerException if the specified element is null
     * @throws IllegalArgumentException if some property of the specified
     *         element prevents it from being added to this queue
     */
Inserts the specified element into this queue, waiting if necessary
for space to become available.


Inserts the specified element into this queue waiting if necessary for space to become available .
public synchronized void put(String content) throws InterruptedException {
        while (queue.size()==maxSize){
            this.wait();
        }
        System.out.println(" blockQueue put ,value : "+content);
        queue.add(content);
        notifyAll();
    }
public synchronized void put ( String content ) throws InterruptedException { while ( queue . size ( ) == maxSize ) { this . wait ( ) ; } System . out . println ( " blockQueue put ,value : " + content ) ; queue . add ( content ) ; notifyAll ( ) ; }
Inserts the specified element into this queue, waiting if necessary
 for space to become available.
Inserts the specified element into this queue waiting if necessary for space to become available .