|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jniwrapper.Parameter com.jniwrapper.Pointer.Void com.jniwrapper.win32.Handle com.jniwrapper.win32.process.monitoring.Snapshot
public final class Snapshot
Snapshot class represents a system performance snapshot. Snapshot enables to list all running processes, modules, threads and heaps.
NOTE: Do not forget to clean up the snapshot object using theclose()
method.
Nested Class Summary | |
---|---|
static class |
Snapshot.Options
Options class represents options for taking a performance snapshots. |
protected static class |
Snapshot.SnapshotResource
This class is responsible for destroying a native resource when the instance is collected by GC. |
Field Summary |
---|
Fields inherited from class com.jniwrapper.win32.Handle |
---|
INFINITE_TIMEOUT, INVALID_HANDLE_VALUE, STATUS_ABANDONED_WAIT_0, STATUS_TIMEOUT, STATUS_WAIT_0 |
Fields inherited from class com.jniwrapper.Parameter |
---|
LICENSE_TYPE, V |
Constructor Summary | |
---|---|
Snapshot(Snapshot.Options options)
Creates a snapshot of specified processes in the system, as well as heaps, modules, and threads used by these processes. |
|
Snapshot(Snapshot.Options options,
long processID)
Creates a snapshot of specified processes in the system, as well as heaps, modules, and threads used by these processes. |
Method Summary | |
---|---|
void |
close()
Closes the snapshot. |
java.util.List |
getHeapEntries(long processID,
long heapID)
|
java.util.Iterator |
getHeapEntriesIterator(long processID,
long heapID)
Returns a list of heap entries for the given process and the heap. |
java.util.List |
getHeapList()
Returns a list of heap list from a snapshot. |
java.util.Iterator |
getHeapListIterator()
Returns iterator for enumerating heap list from a snapshot. |
java.util.Iterator |
getModuleIterator()
Returns an iterator for enumerating modules from the snapshot. |
java.util.List |
getModules()
Returns a list of modules from the snapshot. |
Snapshot.Options |
getOptions()
Returns SnapshotOptions. |
java.util.List |
getProcesses()
Returns a list of processes from the snapshot. |
long |
getProcessID()
Returns a specified processID. |
java.util.Iterator |
getProcessIterator()
Returns an iterator for enumerating processes from the snapshot. |
java.util.Iterator |
getThreadIterator()
Returns iterator for enumerating threads from a snapshot. |
java.util.List |
getThreadList()
Returns a list of threads from a snapshot. |
void |
run()
Updates the instance with new snapshot data. |
void |
setProcessID(long processID)
Sets a new processID. |
Methods inherited from class com.jniwrapper.win32.Handle |
---|
clone, closeHandle, equals, waitFor, waitFor |
Methods inherited from class com.jniwrapper.Pointer.Void |
---|
asFunction, asFunction, asTypedPointer, castTo, castTo, getDebugInfo, getLength, getValue, hashCode, isNull, read, setValue, toString, write |
Methods inherited from class com.jniwrapper.Parameter |
---|
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Snapshot(Snapshot.Options options)
options
- Portions of the system information to include in the snapshot.public Snapshot(Snapshot.Options options, long processID)
options
- Portions of the system information to include in the snapshot.processID
- Process identifier of the process to be included in the snapshot.Method Detail |
---|
public Snapshot.Options getOptions()
public long getProcessID()
public void setProcessID(long processID)
processID
- new processID.public void run()
run
in interface java.lang.Runnable
public java.util.Iterator getProcessIterator()
ProcessEntry
class.
public java.util.List getProcesses()
ProcessEntry
class.
public java.util.Iterator getModuleIterator()
ModuleEntry
class.
public java.util.List getModules()
ModuleEntry
class.
public java.util.Iterator getHeapEntriesIterator(long processID, long heapID)
HeapEntry
class.
processID
- Identifier of the process context that owns the heap.heapID
- Identifier of the heap to be enumerated.
public java.util.List getHeapEntries(long processID, long heapID)
public java.util.Iterator getHeapListIterator()
HeapList
class.
public java.util.List getHeapList()
HeapList
class.
public java.util.Iterator getThreadIterator()
ThreadEntry
class.
public java.util.List getThreadList()
ThreadEntry
class.
public void close()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |