public abstract class Flusher<C extends Flusher.Config>
extends java.lang.Object
implements java.io.Flushable, java.io.Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
Flusher.Config<T extends Flusher,C extends Flusher.Config> |
| Modifier and Type | Field and Description |
|---|---|
protected Buffer |
buffer |
protected C |
flusherConfig |
protected Sender |
sender |
| Constructor and Description |
|---|
Flusher(Buffer buffer,
Sender sender,
C flusherConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
closeBuffer() |
protected abstract void |
closeInternal() |
void |
flush() |
protected abstract void |
flushInternal(boolean force) |
Buffer |
getBuffer() |
void |
onUpdate() |
protected final Buffer buffer
protected final Sender sender
protected final C extends Flusher.Config flusherConfig
public Buffer getBuffer()
protected abstract void flushInternal(boolean force)
throws java.io.IOException
java.io.IOExceptionprotected abstract void closeInternal()
throws java.io.IOException
java.io.IOExceptionpublic void onUpdate()
throws java.io.IOException
java.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushablejava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionprotected void closeBuffer()