Class Buffer

java.lang.Object
org.komamitsu.fluency.buffer.Buffer
All Implemented Interfaces:
Closeable, AutoCloseable

public class Buffer extends Object implements Closeable
  • Constructor Details

  • Method Details

    • saveBuffer

      protected void saveBuffer(List<String> params, ByteBuffer buffer)
    • flush

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

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getBufferUsage

      public float getBufferUsage()
    • clearBackupFiles

      public void clearBackupFiles()
    • getMaxBufferSize

      public long getMaxBufferSize()
    • getFileBackupPrefix

      public String getFileBackupPrefix()
    • getFileBackupDir

      public String getFileBackupDir()
    • loadBufferFromFile

      protected void loadBufferFromFile(List<String> params, FileChannel channel)
    • saveAllBuffersToFile

      protected void saveAllBuffersToFile() throws IOException
      Throws:
      IOException
    • append

      public void append(String tag, long timestamp, Map<String,Object> data) throws IOException
      Throws:
      IOException
    • append

      public void append(String tag, EventTime timestamp, Map<String,Object> data) throws IOException
      Throws:
      IOException
    • appendMessagePackMapValue

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

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

      public void appendMessagePackMapValue(String tag, long timestamp, ByteBuffer mapValue) throws IOException
      Throws:
      IOException
    • appendMessagePackMapValue

      public void appendMessagePackMapValue(String tag, EventTime timestamp, ByteBuffer mapValue) throws IOException
      Throws:
      IOException
    • flushInternal

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

      protected void closeInternal()
    • getAllocatedSize

      public long getAllocatedSize()
    • getBufferedDataSize

      public long getBufferedDataSize()
    • getJvmHeapBufferMode

      public boolean getJvmHeapBufferMode()
    • bufferFormatType

      public String bufferFormatType()
    • getChunkInitialSize

      public int getChunkInitialSize()
    • getChunkExpandRatio

      public float getChunkExpandRatio()
    • getChunkRetentionSize

      public int getChunkRetentionSize()
    • getChunkRetentionTimeMillis

      public int getChunkRetentionTimeMillis()
    • toString

      public String toString()
      Overrides:
      toString in class Object