FileSink instead.@InterfaceAudience.Public @InterfaceStability.Evolving @Deprecated public class FileContext extends AbstractMetricsContext
myContextName.fileName=/tmp/metrics.log myContextName.period=5
AbstractMetricsContext.MetricMap, AbstractMetricsContext.TagMap| 限定符和类型 | 字段和说明 |
|---|---|
protected static String |
FILE_NAME_PROPERTY
已过时。
|
protected static String |
PERIOD_PROPERTY
已过时。
|
DEFAULT_PERIOD| 构造器和说明 |
|---|
FileContext()
已过时。
Creates a new instance of FileContext
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
emitRecord(String contextName,
String recordName,
OutputRecord outRec)
已过时。
Emits a metrics record to a file.
|
void |
flush()
已过时。
Flushes the output writer, forcing updates to disk.
|
String |
getFileName()
已过时。
Returns the configured file name, or null.
|
void |
init(String contextName,
ContextFactory factory)
已过时。
Initializes the context.
|
void |
startMonitoring()
已过时。
Starts or restarts monitoring, by opening in append-mode, the
file specified by the
fileName attribute,
if specified. |
void |
stopMonitoring()
已过时。
Stops monitoring, closing the file.
|
close, createRecord, getAllRecords, getAttribute, getAttributeTable, getContextFactory, getContextName, getPeriod, isMonitoring, newRecord, parseAndSetPeriod, registerUpdater, remove, setPeriod, unregisterUpdater, update@InterfaceAudience.Private protected static final String FILE_NAME_PROPERTY
@InterfaceAudience.Private protected static final String PERIOD_PROPERTY
@InterfaceAudience.Private public FileContext()
@InterfaceAudience.Private public void init(String contextName, ContextFactory factory)
AbstractMetricsContextinit 在接口中 MetricsContextinit 在类中 AbstractMetricsContextcontextName - The given name for this contextfactory - The creator of this context@InterfaceAudience.Private public String getFileName()
@InterfaceAudience.Private public void startMonitoring() throws IOException
fileName attribute,
if specified. Otherwise the data will be written to standard
output.startMonitoring 在接口中 MetricsContextstartMonitoring 在类中 AbstractMetricsContextIOException@InterfaceAudience.Private public void stopMonitoring()
stopMonitoring 在接口中 MetricsContextstopMonitoring 在类中 AbstractMetricsContextAbstractMetricsContext.close()@InterfaceAudience.Private public void emitRecord(String contextName, String recordName, OutputRecord outRec)
emitRecord 在类中 AbstractMetricsContext@InterfaceAudience.Private public void flush()
flush 在类中 AbstractMetricsContextCopyright © 2009 The Apache Software Foundation