Package org.opensearch.index.translog
Class BufferedChecksumStreamOutput
java.lang.Object
java.io.OutputStream
org.opensearch.core.common.io.stream.StreamOutput
org.opensearch.index.translog.BufferedChecksumStreamOutput
- All Implemented Interfaces:
Closeable
,Flushable
,AutoCloseable
@PublicApi(since="1.0.0")
public final class BufferedChecksumStreamOutput
extends org.opensearch.core.common.io.stream.StreamOutput
Similar to Lucene's BufferedChecksumIndexOutput, however this wraps a
StreamOutput
so anything written will update the checksum- Opensearch.api:
-
Constructor Summary
ConstructorsConstructorDescriptionBufferedChecksumStreamOutput
(org.opensearch.core.common.io.stream.StreamOutput out) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
flush()
long
void
reset()
void
void
writeByte
(byte b) void
writeBytes
(byte[] b, int offset, int length) Methods inherited from class org.opensearch.core.common.io.stream.StreamOutput
checkWriteable, failOnTooManyNestedExceptions, getFeatures, getVersion, getWriter, hasFeature, position, seek, setFeatures, setVersion, write, write, writeArray, writeArray, writeBigInteger, writeBoolean, writeBuild, writeByteArray, writeBytes, writeBytes, writeBytesRef, writeBytesReference, writeCollection, writeCollection, writeDouble, writeDoubleArray, writeEnum, writeEnumSet, writeException, writeFloat, writeFloatArray, writeGenericValue, writeInstant, writeInt, writeIntArray, writeList, writeLong, writeLongArray, writeMap, writeMap, writeMapOfLists, writeMapWithConsistentOrder, writeNamedWriteable, writeNamedWriteableList, writeOptionalArray, writeOptionalArray, writeOptionalBoolean, writeOptionalBytesReference, writeOptionalDouble, writeOptionalFloat, writeOptionalInstant, writeOptionalInt, writeOptionalLong, writeOptionalNamedWriteable, writeOptionalSecureString, writeOptionalString, writeOptionalStringArray, writeOptionalStringCollection, writeOptionalText, writeOptionalTimeValue, writeOptionalVInt, writeOptionalVLong, writeOptionalWriteable, writeOptionalZoneId, writeSecureString, writeSemverRange, writeShort, writeString, writeStringArray, writeStringArrayNullable, writeStringCollection, writeText, writeTimeValue, writeVersion, writeVInt, writeVIntArray, writeVLong, writeVLongArray, writeVLongNoCheck, writeZLong, writeZoneId
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
Constructor Details
-
BufferedChecksumStreamOutput
public BufferedChecksumStreamOutput(org.opensearch.core.common.io.stream.StreamOutput out)
-
-
Method Details
-
getChecksum
public long getChecksum() -
writeByte
- Specified by:
writeByte
in classorg.opensearch.core.common.io.stream.StreamOutput
- Throws:
IOException
-
writeBytes
- Specified by:
writeBytes
in classorg.opensearch.core.common.io.stream.StreamOutput
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classorg.opensearch.core.common.io.stream.StreamOutput
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classorg.opensearch.core.common.io.stream.StreamOutput
- Throws:
IOException
-
reset
- Specified by:
reset
in classorg.opensearch.core.common.io.stream.StreamOutput
- Throws:
IOException
-
resetDigest
public void resetDigest()
-