public class RollingFileOutputWriter extends AbstractOutputWriter
| Modifier and Type | Class and Description |
|---|---|
static class |
RollingFileOutputWriter.IoUtils |
| Modifier and Type | Field and Description |
|---|---|
protected File |
file |
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 |
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) |
protected void |
releaseTemporaryWriter() |
void |
writeInvocationResult(String invocationName,
Object value) |
void |
writeQueryResult(String name,
String type,
Object value) |
getDebugLevel, getInfoLevel, getTraceLevel, preCollect, 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
protected Writer temporaryFileWriter
protected File temporaryFile
protected File file
protected long maxFileSize
protected int maxBackupIndex
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 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 © 2015. All Rights Reserved.