Package org.jmxtrans.agent
Class FileOverwriterOutputWriter
java.lang.Object
org.jmxtrans.agent.AbstractOutputWriter
org.jmxtrans.agent.FileOverwriterOutputWriter
- All Implemented Interfaces:
OutputWriter
public class FileOverwriterOutputWriter extends AbstractOutputWriter
- Author:
- Cyrille Le Clerc
-
Field Summary
Fields Modifier and Type Field Description protected Filefilestatic StringSETTING_FILE_NAMEstatic StringSETTING_FILE_NAME_DEFAULT_VALUEstatic StringSETTING_SHOW_TIMESTAMPstatic BooleanSETTING_SHOW_TIMESTAMP_DEFAULTprotected BooleanshowTimeStampprotected FiletemporaryFileprotected WritertemporaryFileWriterFields inherited from class org.jmxtrans.agent.AbstractOutputWriter
logger, SETTING_LOG_LEVEL, SETTING_LOG_LEVEL_DEFAULT_VALUE -
Constructor Summary
Constructors Constructor Description FileOverwriterOutputWriter() -
Method Summary
Modifier and Type Method Description protected WritergetTemporaryFileWriter()voidpostCollect()called after a serie of writes, typically at the end of a collection.voidpostConstruct(Map<String,String> settings)protected voidreleaseTemporaryWriter()voidwriteInvocationResult(String invocationName, Object value)voidwriteQueryResult(String name, String type, Object value)Methods inherited from class org.jmxtrans.agent.AbstractOutputWriter
getDebugLevel, getInfoLevel, getTraceLevel, preCollect, preDestroy
-
Field Details
-
SETTING_FILE_NAME
- See Also:
- Constant Field Values
-
SETTING_FILE_NAME_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
SETTING_SHOW_TIMESTAMP
- See Also:
- Constant Field Values
-
SETTING_SHOW_TIMESTAMP_DEFAULT
-
temporaryFileWriter
-
temporaryFile
-
file
-
showTimeStamp
-
-
Constructor Details
-
FileOverwriterOutputWriter
public FileOverwriterOutputWriter()
-
-
Method Details
-
postConstruct
- Specified by:
postConstructin interfaceOutputWriter- Overrides:
postConstructin classAbstractOutputWriter
-
getTemporaryFileWriter
- Throws:
IOException
-
writeInvocationResult
- Specified by:
writeInvocationResultin interfaceOutputWriter- Specified by:
writeInvocationResultin classAbstractOutputWriter- Throws:
IOException
-
writeQueryResult
public void writeQueryResult(@Nonnull String name, @Nullable String type, @Nullable Object value) throws IOException- Specified by:
writeQueryResultin interfaceOutputWriter- Specified by:
writeQueryResultin classAbstractOutputWritertype- seeQuery.type- Throws:
IOException
-
releaseTemporaryWriter
protected void releaseTemporaryWriter() -
postCollect
Description copied from interface:OutputWritercalled after a serie of writes, typically at the end of a collection.
Useful with batch writers.
- Specified by:
postCollectin interfaceOutputWriter- Overrides:
postCollectin classAbstractOutputWriter- Throws:
IOException
-