public interface ICounterSet extends ICounterNode
Counter
s.Modifier and Type | Interface and Description |
---|---|
static interface |
ICounterSet.IInstrumentFactory
A factory for
IInstrument . |
Modifier and Type | Field and Description |
---|---|
static String |
pathSeparator
Separator for path name components.
|
Modifier and Type | Method and Description |
---|---|
void |
asXML(OutputStream os,
String encoding,
Pattern filter)
Write an XML reprentation of the counters in the hierarchy together with
their current value.
|
String |
asXML(Pattern filter)
Writes out the
ICounterSet as XML on a string and returns that
string. |
void |
asXML(Writer w,
Pattern filter)
Write an XML representation of the counters in the hierarchy together with
their current value - does not write the XML declaration element since
the encoding is unknown.
|
Iterator<ICounter> |
getCounters(Pattern filter)
Visits
ICounter matching the optional filter declared anywhere in
the hierarchy spanned by this ICounterSet . |
ICounterSet |
makePath(String path)
Adds any necessary
ICounterSet s described in the path (ala
mkdirs). |
void |
readXML(InputStream is,
ICounterSet.IInstrumentFactory instrumentFactory,
Pattern filter)
Reads counters into this hierarchy.
|
String |
toString()
A human readable representation of all counters in the hierarchy together
with their current value.
|
String |
toString(Pattern filter)
A human readable representation of the counters in the hierarchy together
with their current value.
|
static final String pathSeparator
Iterator<ICounter> getCounters(Pattern filter)
ICounter
matching the optional filter declared anywhere in
the hierarchy spanned by this ICounterSet
.filter
- An optional regular expression that will be applied to
ICounterNode.getPath()
to filter matches. When specified,
only ICounter
s whose ICounterNode.getPath()
match
will be visited by the Iterator
.ICounterSet makePath(String path)
ICounterSet
s described in the path (ala
mkdirs).path
- The path (may be relative or absolute).ICounterSet
described by the path.IllegalArgumentException
- if the path is null
IllegalArgumentException
- if the path is an empty string.String toString()
String toString(Pattern filter)
filter
- An optional filter that will be used to select only specific
counters.void asXML(OutputStream os, String encoding, Pattern filter) throws IOException
os
- The sink on which the representation will be written.encoding
- The character set encoding that will be used, e.g.,
UTF-8
.filter
- An optional filter that will be used to select only specific
counters.IOException
void asXML(Writer w, Pattern filter) throws IOException
w
- The sink on which the representation will be written.filter
- An optional filter that will be used to select only specific
counters.IOException
String asXML(Pattern filter)
ICounterSet
as XML on a string and returns that
string.filter
- An optional filter.IOException
void readXML(InputStream is, ICounterSet.IInstrumentFactory instrumentFactory, Pattern filter) throws IOException, ParserConfigurationException, SAXException
os
- The source from which the data will be read.instrumentFactory
- Used to create counters on an as needed basis.filter
- An optional filter, when specified only counters matching the
filter will be processed.IOException
ParserConfigurationException
SAXException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.