public static class Kstat2.Kstat2Handle extends PointerType
Constructor and Description |
---|
Kstat2Handle()
Instantiates and opens a new Kstat2Handle with no filtering.
|
Kstat2Handle(Kstat2.Kstat2MatcherList matchers)
Instantiates and opens a new Kstat2Handle filtered with the provided matcher.
|
Modifier and Type | Method and Description |
---|---|
int |
close()
Convenience method for
Kstat2.kstat2_close(PointerByReference) . |
Kstat2.Kstat2Map |
lookupMap(java.lang.String uri)
Convenience method for
Kstat2.kstat2_lookup_map(Kstat2Handle, String, PointerByReference)
that obtains a reference to a kstat2 map given the URI of the map. |
int |
update()
Convenience method for
Kstat2.kstat2_update(Kstat2Handle) that
synchronises the user's view with that of the kernel. |
equals, fromNative, getPointer, hashCode, nativeType, setPointer, toNative, toString
public Kstat2Handle()
Kstat2.kstat2_open(PointerByReference, Kstat2MatcherList)
with a null
matcher list.public Kstat2Handle(Kstat2.Kstat2MatcherList matchers)
Kstat2.kstat2_open(PointerByReference, Kstat2MatcherList)
.matchers
- Only kstats that match one or more of the provided matchers will
be available. If a NULL or empty matcher list is provided, all of
the system's kstats will be available. Restricting the number of
kstats available will improve performance and reduce the memory
footprint.public int update()
Kstat2.kstat2_update(Kstat2Handle)
that
synchronises the user's view with that of the kernel. The kernel may at any
point add or remove kstats, causing the user's view of the available kstats
to become out of date.Kstat2.KSTAT2_S_OK
. If an error occurs a value other than
KSTAT2_S_OK is returned.public Kstat2.Kstat2Map lookupMap(java.lang.String uri)
Kstat2.kstat2_lookup_map(Kstat2Handle, String, PointerByReference)
that obtains a reference to a kstat2 map given the URI of the map.uri
- The URI of the map to return.public int close()
Kstat2.kstat2_close(PointerByReference)
. After
use, the kstat handle should be closed to reclaim the handles and memory that
it allocated on open.Kstat2.KSTAT2_S_OK
. If an error occurs a value other than
KSTAT2_S_OK is returned.