Class XThreadBuffer<T>

  • Type Parameters:
    T -

    public class XThreadBuffer<T>
    extends java.lang.Object
    Generic XThread class
    Author:
    Kuhajeyan
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean abandoned  
      protected java.util.List<T> buffer  
      protected boolean complete  
      protected static int MAX_SIZE  
    • Constructor Summary

      Constructors 
      Constructor Description
      XThreadBuffer()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void abandon()  
      void add​(T t)  
      T fetch()  
      void signalDone()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAX_SIZE

        protected static int MAX_SIZE
      • buffer

        protected java.util.List<T> buffer
      • complete

        protected boolean complete
      • abandoned

        protected boolean abandoned
    • Constructor Detail

      • XThreadBuffer

        public XThreadBuffer()
        Constructor
    • Method Detail

      • add

        public void add​(T t)
                 throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • abandon

        public void abandon()
      • fetch

        public T fetch()
                throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException
      • signalDone

        public void signalDone()