Class CompressedHintsWriter

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public class CompressedHintsWriter
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.nio.channels.FileChannel channel  
      protected java.util.zip.CRC32 globalCRC  
    • Constructor Summary

      Constructors 
      Constructor Description
      CompressedHintsWriter​(File directory, org.apache.cassandra.hints.HintsDescriptor descriptor, File file, java.nio.channels.FileChannel channel, int fd, java.util.zip.CRC32 globalCRC)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void fsync()  
      protected void writeBuffer​(java.nio.ByteBuffer bb)
      Writes byte buffer into the file channel.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • channel

        protected final java.nio.channels.FileChannel channel
      • globalCRC

        protected final java.util.zip.CRC32 globalCRC
    • Constructor Detail

      • CompressedHintsWriter

        public CompressedHintsWriter​(File directory,
                                     org.apache.cassandra.hints.HintsDescriptor descriptor,
                                     File file,
                                     java.nio.channels.FileChannel channel,
                                     int fd,
                                     java.util.zip.CRC32 globalCRC)
    • Method Detail

      • writeBuffer

        protected void writeBuffer​(java.nio.ByteBuffer bb)
                            throws java.io.IOException
        Writes byte buffer into the file channel. Buffer should be flipped before calling this
        Throws:
        java.io.IOException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
      • fsync

        public void fsync()