Package org.elasticsearch.index.translog
Class BufferedChecksumStreamOutput
org.elasticsearch.common.io.stream.StreamOutput
org.elasticsearch.index.translog.BufferedChecksumStreamOutput
- All Implemented Interfaces:
,
,
Similar to Lucene's BufferedChecksumIndexOutput, however this wraps a
StreamOutput
so anything written will update the checksum-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Closes this stream to further operations.void
flush()
Forces any buffered output to be written.long
void
reset()
void
void
writeByte(byte b)
Writes a single byte.void
writeBytes(byte[] b, int offset, int length)
Writes an array of bytes.Methods inherited from class org.elasticsearch.common.io.stream.StreamOutput
checkWriteable, getFeatures, getVersion, hasFeature, position, seek, setFeatures, setVersion, write, write, writeArray, writeArray, writeBoolean, writeByteArray, writeBytes, writeBytes, writeBytesRef, writeBytesReference, writeCollection, writeCollection, writeDouble, writeDoubleArray, writeEnum, writeEnumSet, writeException, writeFloat, writeFloatArray, writeGenericValue, writeGeoPoint, writeInstant, writeInt, writeIntArray, writeList, writeLong, writeLongArray, writeMap, writeMap, writeMap, writeMap, writeMapOfLists, writeMapWithConsistentOrder, writeNamedWriteable, writeNamedWriteableList, writeOptionalArray, writeOptionalArray, writeOptionalBoolean, writeOptionalBytesReference, writeOptionalDouble, writeOptionalEnum, writeOptionalFloat, writeOptionalInstant, writeOptionalInt, writeOptionalLong, writeOptionalNamedWriteable, writeOptionalSecureString, writeOptionalString, writeOptionalStringArray, writeOptionalStringCollection, writeOptionalText, writeOptionalTimeValue, writeOptionalTimeZone, writeOptionalVInt, writeOptionalVLong, writeOptionalWriteable, writeOptionalZoneId, writeSecureString, writeShort, writeString, writeStringArray, writeStringArrayNullable, writeStringCollection, writeText, writeTimeValue, writeTimeZone, writeVInt, writeVIntArray, writeVLong, writeVLongArray, writeZLong, writeZoneId
Methods inherited from class java.io.
,
Methods inherited from class java.lang.
, , , , , , , , , ,
-
Constructor Details
-
BufferedChecksumStreamOutput
-
-
Method Details
-
getChecksum
public long getChecksum() -
writeByte
public void writeByte(byte b) throwsDescription copied from class:StreamOutput
Writes a single byte.- Specified by:
writeByte
in classStreamOutput
- Throws:
-
writeBytes
public void writeBytes(byte[] b, int offset, int length) throwsDescription copied from class:StreamOutput
Writes an array of bytes.- Specified by:
writeBytes
in classStreamOutput
- Parameters:
b
- the bytes to writeoffset
- the offset in the byte arraylength
- the number of bytes to write- Throws:
-
flush
public void flush() throwsDescription copied from class:StreamOutput
Forces any buffered output to be written.- Specified by:
in interface
- Specified by:
flush
in classStreamOutput
- Throws:
-
close
public void close() throwsDescription copied from class:StreamOutput
Closes this stream to further operations.- Specified by:
in interface
- Specified by:
in interface
- Specified by:
close
in classStreamOutput
- Throws:
-
reset
public void reset() throws- Specified by:
reset
in classStreamOutput
- Throws:
-
resetDigest
public void resetDigest()
-