public static class Kstat2.Kstat2MatcherList extends PointerType
| Constructor and Description |
|---|
Kstat2MatcherList()
Instantiates a new Kstat2MatcherList, allocating the necessary resources.
|
| Modifier and Type | Method and Description |
|---|---|
int |
addMatcher(int type,
java.lang.String match)
Convenience method for
Kstat2.kstat2_add_matcher(int, String, Kstat2MatcherList) that adds
matchers to the provided matcher list. |
int |
free()
Convenience method for
Kstat2.kstat2_free_matcher_list(PointerByReference) that frees the
resources associated with the matcher list. |
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toStringpublic Kstat2MatcherList()
Kstat2.kstat2_alloc_matcher_list(PointerByReference).
It is the caller's responsibility to free this matcher list by calling
free().
public int addMatcher(int type,
java.lang.String match)
Kstat2.kstat2_add_matcher(int, String, Kstat2MatcherList) that adds
matchers to the provided matcher list. Each call appends the new matcher to
the provided matcher list. Matches are on kstat URI, with the following match
types supported: Kstat2.KSTAT2_M_STRING which performs a direct
strcmp with the kstat URI, Kstat2.KSTAT2_M_GLOB which
performs a glob pattern match using gmatch, and
Kstat2.KSTAT2_M_RE which performs a Perl Compatible Regular
Expression (PCRE) match using pcre_exec.type - The type of matcher, from the kstat2_match_type_t
enumeration.match - The string to match.Kstat2.KSTAT2_S_OK. If an error occurs a value other than
KSTAT2_S_OK is returned.public int free()
Kstat2.kstat2_free_matcher_list(PointerByReference) that frees the
resources associated with the matcher list.Kstat2.KSTAT2_S_OK. If an error occurs a value other than
KSTAT2_S_OK is returned.