Package org.apache.cassandra.io.util
Class SafeMemoryWriter
java.lang.Object
java.io.OutputStream
org.apache.cassandra.io.util.DataOutputStreamPlus
org.apache.cassandra.io.util.BufferedDataOutputStreamPlus
org.apache.cassandra.io.util.DataOutputBuffer
org.apache.cassandra.io.util.SafeMemoryWriter
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable,DataOutputPlus
-
Field Summary
Fields inherited from class org.apache.cassandra.io.util.DataOutputBuffer
scratchBufferFields inherited from class org.apache.cassandra.io.util.BufferedDataOutputStreamPlus
bufferFields inherited from class org.apache.cassandra.io.util.DataOutputStreamPlus
channel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcapacity()voidclose()protected voidexpandToFit(long count) longlength()voidtrim()longvalidateReallocation(long newSize) Methods inherited from class org.apache.cassandra.io.util.DataOutputBuffer
asNewBuffer, asString, buffer, buffer, clear, doFlush, flush, getData, getLength, hasPosition, newDefaultChannel, position, setBuffer, toByteArray, unsafeGetBufferAndFlipMethods inherited from class org.apache.cassandra.io.util.BufferedDataOutputStreamPlus
allocate, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeMostSignificantBytes, writeShort, writeUTFMethods inherited from class org.apache.cassandra.io.util.DataOutputStreamPlus
retrieveTemporaryBufferMethods inherited from class java.io.OutputStream
nullOutputStreamMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.io.util.DataOutputPlus
bytesLeftInPage, maxBytesInPage, paddedPosition, padToPageBoundary, write, writeUnsignedVInt, writeUnsignedVInt, writeUnsignedVInt32, writeVInt, writeVInt, writeVInt32
-
Constructor Details
-
SafeMemoryWriter
public SafeMemoryWriter(long initialCapacity)
-
-
Method Details
-
currentBuffer
-
expandToFit
protected void expandToFit(long count) - Overrides:
expandToFitin classDataOutputBuffer
-
trim
public void trim() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classDataOutputBuffer
-
close
-
length
public long length() -
capacity
public long capacity() -
order
- Overrides:
orderin classBufferedDataOutputStreamPlus
-
validateReallocation
public long validateReallocation(long newSize)
-