Class Buffer

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable

    public class Buffer
    extends java.lang.Object
    implements java.io.Closeable
    • Method Detail

      • saveBuffer

        protected void saveBuffer​(java.util.List<java.lang.String> params,
                                  java.nio.ByteBuffer buffer)
      • flush

        public void flush​(Ingester ingester,
                          boolean force)
                   throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
      • getBufferUsage

        public float getBufferUsage()
      • clearBackupFiles

        public void clearBackupFiles()
      • getMaxBufferSize

        public long getMaxBufferSize()
      • getFileBackupPrefix

        public java.lang.String getFileBackupPrefix()
      • getFileBackupDir

        public java.lang.String getFileBackupDir()
      • loadBufferFromFile

        protected void loadBufferFromFile​(java.util.List<java.lang.String> params,
                                          java.nio.channels.FileChannel channel)
      • saveAllBuffersToFile

        protected void saveAllBuffersToFile()
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • append

        public void append​(java.lang.String tag,
                           long timestamp,
                           java.util.Map<java.lang.String,​java.lang.Object> data)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • append

        public void append​(java.lang.String tag,
                           EventTime timestamp,
                           java.util.Map<java.lang.String,​java.lang.Object> data)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • appendMessagePackMapValue

        public void appendMessagePackMapValue​(java.lang.String tag,
                                              long timestamp,
                                              byte[] mapValue,
                                              int offset,
                                              int len)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • appendMessagePackMapValue

        public void appendMessagePackMapValue​(java.lang.String tag,
                                              EventTime timestamp,
                                              byte[] mapValue,
                                              int offset,
                                              int len)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • appendMessagePackMapValue

        public void appendMessagePackMapValue​(java.lang.String tag,
                                              long timestamp,
                                              java.nio.ByteBuffer mapValue)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • appendMessagePackMapValue

        public void appendMessagePackMapValue​(java.lang.String tag,
                                              EventTime timestamp,
                                              java.nio.ByteBuffer mapValue)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • flushInternal

        protected void flushInternal​(Ingester ingester,
                                     boolean force)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • closeInternal

        protected void closeInternal()
      • getAllocatedSize

        public long getAllocatedSize()
      • getBufferedDataSize

        public long getBufferedDataSize()
      • getJvmHeapBufferMode

        public boolean getJvmHeapBufferMode()
      • bufferFormatType

        public java.lang.String bufferFormatType()
      • getChunkInitialSize

        public int getChunkInitialSize()
      • getChunkExpandRatio

        public float getChunkExpandRatio()
      • getChunkRetentionSize

        public int getChunkRetentionSize()
      • getChunkRetentionTimeMillis

        public int getChunkRetentionTimeMillis()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object