public class Buffer
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
Buffer.Config |
| Constructor and Description |
|---|
Buffer(Buffer.Config config,
RecordFormatter recordFormatter) |
Buffer(RecordFormatter recordFormatter) |
| Modifier and Type | Method and Description |
|---|---|
void |
append(java.lang.String tag,
EventTime timestamp,
java.util.Map<java.lang.String,java.lang.Object> data) |
void |
append(java.lang.String tag,
long timestamp,
java.util.Map<java.lang.String,java.lang.Object> data) |
void |
appendMessagePackMapValue(java.lang.String tag,
EventTime timestamp,
byte[] mapValue,
int offset,
int len) |
void |
appendMessagePackMapValue(java.lang.String tag,
EventTime timestamp,
java.nio.ByteBuffer mapValue) |
void |
appendMessagePackMapValue(java.lang.String tag,
long timestamp,
byte[] mapValue,
int offset,
int len) |
void |
appendMessagePackMapValue(java.lang.String tag,
long timestamp,
java.nio.ByteBuffer mapValue) |
java.lang.String |
bufferFormatType() |
void |
clearBackupFiles() |
void |
close() |
protected void |
closeInternal() |
void |
flush(Ingester ingester,
boolean force) |
protected void |
flushInternal(Ingester ingester,
boolean force) |
long |
getAllocatedSize() |
long |
getBufferedDataSize() |
float |
getBufferUsage() |
float |
getChunkExpandRatio() |
int |
getChunkInitialSize() |
int |
getChunkRetentionSize() |
int |
getChunkRetentionTimeMillis() |
java.lang.String |
getFileBackupDir() |
java.lang.String |
getFileBackupPrefix() |
boolean |
getJvmHeapBufferMode() |
long |
getMaxBufferSize() |
protected void |
loadBufferFromFile(java.util.List<java.lang.String> params,
java.nio.channels.FileChannel channel) |
protected void |
saveAllBuffersToFile() |
protected void |
saveBuffer(java.util.List<java.lang.String> params,
java.nio.ByteBuffer buffer) |
java.lang.String |
toString() |
public Buffer(RecordFormatter recordFormatter)
public Buffer(Buffer.Config config, RecordFormatter recordFormatter)
protected void saveBuffer(java.util.List<java.lang.String> params,
java.nio.ByteBuffer buffer)
public void flush(Ingester ingester, boolean force) throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic float getBufferUsage()
public void clearBackupFiles()
public long getMaxBufferSize()
public java.lang.String getFileBackupPrefix()
public java.lang.String getFileBackupDir()
protected void loadBufferFromFile(java.util.List<java.lang.String> params,
java.nio.channels.FileChannel channel)
protected void saveAllBuffersToFile()
throws java.io.IOException
java.io.IOExceptionpublic void append(java.lang.String tag,
long timestamp,
java.util.Map<java.lang.String,java.lang.Object> data)
throws java.io.IOException
java.io.IOExceptionpublic void append(java.lang.String tag,
EventTime timestamp,
java.util.Map<java.lang.String,java.lang.Object> data)
throws java.io.IOException
java.io.IOExceptionpublic void appendMessagePackMapValue(java.lang.String tag,
long timestamp,
byte[] mapValue,
int offset,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void appendMessagePackMapValue(java.lang.String tag,
EventTime timestamp,
byte[] mapValue,
int offset,
int len)
throws java.io.IOException
java.io.IOExceptionpublic void appendMessagePackMapValue(java.lang.String tag,
long timestamp,
java.nio.ByteBuffer mapValue)
throws java.io.IOException
java.io.IOExceptionpublic void appendMessagePackMapValue(java.lang.String tag,
EventTime timestamp,
java.nio.ByteBuffer mapValue)
throws java.io.IOException
java.io.IOExceptionprotected void flushInternal(Ingester ingester, boolean force) throws java.io.IOException
java.io.IOExceptionprotected void closeInternal()
public long getAllocatedSize()
public long getBufferedDataSize()
public boolean getJvmHeapBufferMode()
public java.lang.String bufferFormatType()
public int getChunkInitialSize()
public float getChunkExpandRatio()
public int getChunkRetentionSize()
public int getChunkRetentionTimeMillis()
public java.lang.String toString()
toString in class java.lang.Object