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