Class AbstractSharedBuffer

java.lang.Object
org.apache.hc.core5.http.impl.nio.ExpandableBuffer
org.apache.hc.core5.http.nio.support.classic.AbstractSharedBuffer
Direct Known Subclasses:
SharedInputBuffer, SharedOutputBuffer

@Contract(threading=SAFE) abstract class AbstractSharedBuffer extends ExpandableBuffer
Since:
5.0
  • Field Details

    • lock

      final ReentrantLock lock
    • condition

      final Condition condition
    • endStream

      volatile boolean endStream
    • aborted

      volatile boolean aborted
  • Constructor Details

    • AbstractSharedBuffer

      public AbstractSharedBuffer(ReentrantLock lock, int initialBufferSize)
  • Method Details

    • hasData

      public boolean hasData()
      Description copied from class: ExpandableBuffer
      Determines if the buffer contains data.

      Sets the mode to output.

      Overrides:
      hasData in class ExpandableBuffer
      Returns:
      true if there is data in the buffer, false otherwise.
    • capacity

      public int capacity()
      Description copied from class: ExpandableBuffer
      Returns available capacity of this buffer.
      Overrides:
      capacity in class ExpandableBuffer
      Returns:
      buffer length.
    • length

      public int length()
      Description copied from class: ExpandableBuffer
      Returns the length of this buffer.

      Sets the mode to output.

      Overrides:
      length in class ExpandableBuffer
      Returns:
      buffer length.
    • abort

      public void abort()
    • reset

      public void reset()
    • isEndStream

      public boolean isEndStream()