public class RollingFileOutputWriter extends AbstractOutputWriter
| Modifier and Type | Field and Description |
|---|---|
protected java.io.File |
file |
protected boolean |
firstResult |
protected int |
maxBackupIndex |
protected long |
maxFileSize |
static java.lang.String |
SETTING_FILE_NAME |
static java.lang.String |
SETTING_FILE_NAME_DEFAULT_VALUE |
static java.lang.String |
SETTING_MAX_BACKUP_INDEX |
static int |
SETTING_MAX_BACKUP_INDEX_DEFAULT_VALUE |
static java.lang.String |
SETTING_MAX_FILE_SIZE |
static long |
SETTING_MAX_FILE_SIZE_DEFAULT_VALUE |
static java.lang.String |
SETTING_SINGLE_LINE |
static boolean |
SETTING_SINGLE_LINE_DEFAULT_VALUE |
protected boolean |
singleLine |
protected java.io.File |
temporaryFile |
protected java.io.Writer |
temporaryFileWriter |
logger, SETTING_LOG_LEVEL, SETTING_LOG_LEVEL_DEFAULT_VALUE| Constructor and Description |
|---|
RollingFileOutputWriter() |
| Modifier and Type | Method and Description |
|---|---|
protected java.io.Writer |
getTemporaryFileWriter() |
void |
postCollect()
called after a serie of writes, typically at the end of a collection.
|
void |
postConstruct(java.util.Map<java.lang.String,java.lang.String> settings) |
void |
preCollect()
Called before metrics collection starts
|
protected void |
releaseTemporaryWriter() |
void |
writeInvocationResult(java.lang.String invocationName,
java.lang.Object value) |
void |
writeQueryResult(java.lang.String name,
java.lang.String type,
java.lang.Object value) |
getDebugLevel, getInfoLevel, getTraceLevel, preDestroypublic static final java.lang.String SETTING_FILE_NAME
public static final java.lang.String SETTING_FILE_NAME_DEFAULT_VALUE
public static final java.lang.String SETTING_MAX_FILE_SIZE
public static final long SETTING_MAX_FILE_SIZE_DEFAULT_VALUE
public static final java.lang.String SETTING_MAX_BACKUP_INDEX
public static final int SETTING_MAX_BACKUP_INDEX_DEFAULT_VALUE
public static final java.lang.String SETTING_SINGLE_LINE
public static final boolean SETTING_SINGLE_LINE_DEFAULT_VALUE
protected java.io.Writer temporaryFileWriter
protected java.io.File temporaryFile
protected java.io.File file
protected long maxFileSize
protected int maxBackupIndex
protected boolean singleLine
protected boolean firstResult
public void postConstruct(java.util.Map<java.lang.String,java.lang.String> settings)
postConstruct in interface OutputWriterpostConstruct in class AbstractOutputWriterprotected java.io.Writer getTemporaryFileWriter()
throws java.io.IOException
java.io.IOExceptionpublic void writeInvocationResult(java.lang.String invocationName,
java.lang.Object value)
throws java.io.IOException
writeInvocationResult in interface OutputWriterwriteInvocationResult in class AbstractOutputWriterjava.io.IOExceptionpublic void writeQueryResult(@Nonnull
java.lang.String name,
@Nullable
java.lang.String type,
@Nullable
java.lang.Object value)
throws java.io.IOException
writeQueryResult in interface OutputWriterwriteQueryResult in class AbstractOutputWritertype - see Query.typejava.io.IOExceptionprotected void releaseTemporaryWriter()
public void preCollect()
throws java.io.IOException
OutputWriterpreCollect in interface OutputWriterpreCollect in class AbstractOutputWriterjava.io.IOExceptionpublic void postCollect()
throws java.io.IOException
OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
postCollect in interface OutputWriterpostCollect in class AbstractOutputWriterjava.io.IOExceptionCopyright © 2019. All Rights Reserved.