Class CircularBuffer


  • public class CircularBuffer
    extends java.lang.Object
    • Field Detail

      • buf

        protected java.lang.Object[] buf
      • in

        protected int in
      • out

        protected int out
      • count

        protected int count
      • size

        protected int size
      • interruptPut

        protected boolean interruptPut
      • interruptGet

        protected boolean interruptGet
      • closePut

        protected boolean closePut
    • Constructor Detail

      • CircularBuffer

        public CircularBuffer​(int size)
    • Method Detail

      • isEmpty

        public boolean isEmpty()
      • put

        public boolean put​(java.lang.Object o)
                    throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • get

        public java.lang.Object get()
                             throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • closePut

        public void closePut()
      • isPutClosed

        public boolean isPutClosed()
      • interruptBoth

        public void interruptBoth()
      • interruptGet

        public void interruptGet()
      • interruptPut

        public void interruptPut()
      • isGetInterrupted

        public boolean isGetInterrupted()
      • isPutInterrupted

        public boolean isPutInterrupted()