Class KeyValueStreamDataChannel

java.lang.Object
org.apache.hadoop.ozone.container.keyvalue.impl.KeyValueStreamDataChannel
All Implemented Interfaces:
Closeable, AutoCloseable, Channel, WritableByteChannel, org.apache.ratis.statemachine.StateMachine.DataChannel

public class KeyValueStreamDataChannel extends Object
This class is used to get the DataChannel for streaming.
  • Method Details

    • write

      public int write(org.apache.ratis.util.ReferenceCountedObject<ByteBuffer> referenceCounted) throws IOException
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Channel
      Specified by:
      close in interface Closeable
      Throws:
      IOException
    • cleanupInternal

      protected void cleanupInternal() throws IOException
      Throws:
      IOException
    • checkVolume

      protected void checkVolume()
    • force

      public final void force(boolean metadata) throws IOException
      Specified by:
      force in interface org.apache.ratis.statemachine.StateMachine.DataChannel
      Throws:
      IOException
    • isOpen

      public final boolean isOpen()
      Specified by:
      isOpen in interface Channel
    • assertSpaceAvailability

      protected void assertSpaceAvailability(int requested) throws org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException
      Throws:
      org.apache.hadoop.hdds.scm.container.common.helpers.StorageContainerException
    • setLinked

      public void setLinked()
    • cleanUp

      public boolean cleanUp()
      Returns:
      true if StateMachine.DataChannel is already linked.
    • getMetrics

      public ContainerMetrics getMetrics()
    • toString

      public String toString()
      Overrides:
      toString in class Object