// Path: jdklib/src/main/java/com/current/lock/Lock.java
// public interface Lock {
// 
//     void lock() throws InterruptedException;
//     void unlock();
// }
// 
// Path: jdklib/src/main/java/com/current/lock/v1/SynchronizedLock.java
// public class SynchronizedLock implements Lock {
// 
//     private Logger logger = Logger.getLogger(SynchronizedLock.class.getName());
// 
//     private Byte[] obj;
//     private volatile boolean hasLock;
// 
//     public SynchronizedLock(){
//         obj = new Byte[0];
//         hasLock = false;
//     }
// 
//     @Override
//     public void lock() throws InterruptedException {
//         synchronized (obj){
//             while (hasLock){
//                 try{
//                     obj.wait();
//                 }catch (InterruptedException exception){
//                     logger.log(Level.WARNING, Thread.currentThread().getState().toString());
//                     throw new InterruptedException(exception.getMessage());
//                 }
//             }
//             hasLock = true;
//         }
//     }
// 
//     @Override
//     public void unlock() {
//         synchronized (obj){
//             hasLock = false;
//             obj.notifyAll();
//         }
//     }
// }
// 
// Path: jdklib/src/main/java/com/current/queue/BlockingQueue.java
// public interface BlockingQueue<T> {
// 
//     T take() throws InterruptedException;
// 
//     void put(T object) throws InterruptedException;
// }


import com.current.lock.Lock;
import com.current.lock.v1.SynchronizedLock;
import com.current.queue.BlockingQueue;
import java.util.logging.Logger;
package com.current.queue.projectAPI;



/**
 * Author Mr.Pro
 * Date   9/10/17 = 3:48 PM
 */
public class ArraysSynchronizedLockQueue<T> implements BlockingQueue<T> {
    private Logger logger = Logger.getLogger(ArraysSynchronizedLockQueue.class.getName());
// Path: jdklib/src/main/java/com/current/lock/Lock.java
// public interface Lock {
// 
//     void lock() throws InterruptedException;
//     void unlock();
// }
// 
// Path: jdklib/src/main/java/com/current/lock/v1/SynchronizedLock.java
// public class SynchronizedLock implements Lock {
// 
//     private Logger logger = Logger.getLogger(SynchronizedLock.class.getName());
// 
//     private Byte[] obj;
//     private volatile boolean hasLock;
// 
//     public SynchronizedLock(){
//         obj = new Byte[0];
//         hasLock = false;
//     }
// 
//     @Override
//     public void lock() throws InterruptedException {
//         synchronized (obj){
//             while (hasLock){
//                 try{
//                     obj.wait();
//                 }catch (InterruptedException exception){
//                     logger.log(Level.WARNING, Thread.currentThread().getState().toString());
//                     throw new InterruptedException(exception.getMessage());
//                 }
//             }
//             hasLock = true;
//         }
//     }
// 
//     @Override
//     public void unlock() {
//         synchronized (obj){
//             hasLock = false;
//             obj.notifyAll();
//         }
//     }
// }
// 
// Path: jdklib/src/main/java/com/current/queue/BlockingQueue.java
// public interface BlockingQueue<T> {
// 
//     T take() throws InterruptedException;
// 
//     void put(T object) throws InterruptedException;
// }


// Path: jdklib/src/main/java/com/current/queue/projectAPI/ArraysSynchronizedLockQueue.java
import com.current.lock.Lock;
import com.current.lock.v1.SynchronizedLock;
import com.current.queue.BlockingQueue;
import java.util.logging.Logger;

package com.current.queue.projectAPI;



/**
 * Author Mr.Pro
 * Date   9/10/17 = 3:48 PM
 */
public class ArraysSynchronizedLockQueue<T> implements BlockingQueue<T> {
    private Logger logger = Logger.getLogger(ArraysSynchronizedLockQueue.class.getName());
    private static int DEFAULT_SIZE = 100;