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:
java.io.Closeable,java.io.DataOutput,java.io.Flushable,java.lang.AutoCloseable,DataOutputPlus
public class SafeMemoryWriter extends DataOutputBuffer
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.io.util.DataOutputBuffer
scratchBuffer
-
Fields inherited from class org.apache.cassandra.io.util.BufferedDataOutputStreamPlus
buffer
-
Fields inherited from class org.apache.cassandra.io.util.DataOutputStreamPlus
channel
-
-
Constructor Summary
Constructors Constructor Description SafeMemoryWriter(long initialCapacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcapacity()voidclose()java.lang.Throwableclose(java.lang.Throwable accumulate)SafeMemorycurrentBuffer()protected voidexpandToFit(long count)longlength()SafeMemoryWriterorder(java.nio.ByteOrder order)voidtrim()longvalidateReallocation(long newSize)-
Methods inherited from class org.apache.cassandra.io.util.DataOutputBuffer
asNewBuffer, buffer, buffer, clear, doFlush, flush, getData, getLength, hasPosition, newDefaultChannel, position, toByteArray
-
Methods inherited from class org.apache.cassandra.io.util.BufferedDataOutputStreamPlus
write, write, write, write, writeBoolean, writeByte, writeBytes, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
-
Methods inherited from class org.apache.cassandra.io.util.DataOutputStreamPlus
retrieveTemporaryBuffer
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.io.util.DataOutputPlus
write, writeUnsignedVInt, writeVInt
-
-
-
-
Method Detail
-
currentBuffer
public SafeMemory currentBuffer()
-
expandToFit
protected void expandToFit(long count)
- Overrides:
expandToFitin classDataOutputBuffer
-
trim
public void trim()
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classDataOutputBuffer
-
close
public java.lang.Throwable close(java.lang.Throwable accumulate)
-
length
public long length()
-
capacity
public long capacity()
-
order
public SafeMemoryWriter order(java.nio.ByteOrder order)
- Overrides:
orderin classBufferedDataOutputStreamPlus
-
validateReallocation
public long validateReallocation(long newSize)
-
-