public abstract class AbstractBatchingLogger extends Object implements BatchingLogger
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractBatchingLogger.BatchEntry |
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MIN_BATCH_SIZE |
| Constructor and Description |
|---|
AbstractBatchingLogger() |
AbstractBatchingLogger(int minBatchSize) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Unit> |
forceFlush()
Signals to upload whatever remaining information is buffered.
|
Optional<com.google.common.util.concurrent.ListenableFuture<Unit>> |
log(String logLine) |
protected abstract com.google.common.util.concurrent.ListenableFuture<Unit> |
logMultiple(com.google.common.collect.ImmutableCollection<AbstractBatchingLogger.BatchEntry> data) |
public static final int DEFAULT_MIN_BATCH_SIZE
public AbstractBatchingLogger(int minBatchSize)
public AbstractBatchingLogger()
public Optional<com.google.common.util.concurrent.ListenableFuture<Unit>> log(String logLine)
log in interface BatchingLoggerlogLine - data to upload.Optional.empty() if the data has merely been buffered, a ListenableFuture representing the upload otherwise.public com.google.common.util.concurrent.ListenableFuture<Unit> forceFlush()
BatchingLoggerforceFlush in interface BatchingLoggerprotected abstract com.google.common.util.concurrent.ListenableFuture<Unit> logMultiple(com.google.common.collect.ImmutableCollection<AbstractBatchingLogger.BatchEntry> data)