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
This class is used to get the DataChannel for streaming.
-
Method Summary
Modifier and TypeMethodDescriptionprotected voidassertSpaceAvailability(int requested) protected voidbooleancleanUp()protected voidvoidclose()final voidforce(boolean metadata) final booleanisOpen()voidtoString()intwrite(org.apache.ratis.util.ReferenceCountedObject<ByteBuffer> referenceCounted) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.ratis.statemachine.StateMachine.DataChannel
write
-
Method Details
-
write
public int write(org.apache.ratis.util.ReferenceCountedObject<ByteBuffer> referenceCounted) throws IOException - Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Throws:
IOException
-
cleanupInternal
- Throws:
IOException
-
checkVolume
protected void checkVolume() -
force
- Specified by:
forcein interfaceorg.apache.ratis.statemachine.StateMachine.DataChannel- Throws:
IOException
-
isOpen
public final boolean isOpen() -
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.DataChannelis already linked.
-
getMetrics
-
toString
-