public class HeapDumpOptions
extends java.lang.Object
Controller.triggerHeapDump(HeapDumpOptions)
The default values after constructing an instance of this class are equivalent to calling
heapDumpOptions.fullGc(true).primitiveData(true).calculateRetainedSizes(true).selectRecorded(true)
.Modifier and Type | Field and Description |
---|---|
static HeapDumpOptions |
DEFAULT
The default value used by
Controller.triggerHeapDump() . |
static HeapDumpOptions |
NO_FULL_GC
Same as
DEFAULT , only with fullGc(false) . |
static HeapDumpOptions |
SELECT_RECORDED
Same as
DEFAULT , only with selectRecorded(true) . |
Constructor and Description |
---|
HeapDumpOptions()
Create a new instance with the default options described above.
|
Modifier and Type | Method and Description |
---|---|
HeapDumpOptions |
calculateRetainedSizes(boolean calculateRetainedSizes)
Determines whether retained sizes should be calculated for the heap dump.
|
HeapDumpOptions |
freeze()
Make these heap dump options unmodifiable.
|
HeapDumpOptions |
fullGc(boolean fullGc)
Determines whether a full garbage collection should be performed for the heap dump.
|
boolean |
isCalculateRetainedSizes()
Returns if retained sizes should be calculated for the heap dump.
|
boolean |
isFullGc()
Returns if a full garbage collection should be performed for the heap dump.
|
boolean |
isPrimitiveData()
Returns if primitive data should be recorded for the heap dump.
|
boolean |
isRetainFinalizerReferences()
Returns if finalizer references should retain objects in heap dump if full GC is selected.
|
boolean |
isRetainPhantomReferences()
Returns if phantom references should retain objects in heap dump if full GC is selected.
|
boolean |
isRetainSoftReferences()
Returns if soft references should retain objects in heap dump if full GC is selected.
|
boolean |
isRetainWeakReferences()
Returns if weak references should retain objects in heap dump if full GC is selected.
|
boolean |
isSelectRecorded()
Returns if recorded objects should be selected when the heap dump is opened in the JProfiler GUI.
|
HeapDumpOptions |
primitiveData(boolean primitiveData)
Determines whether primitive data should be recorded for the heap dump.
|
HeapDumpOptions |
retainFinalizerReferences(boolean retainFinalizerReferences)
Determines whether finalizer references should be considered for full GC.
|
HeapDumpOptions |
retainPhantomReferences(boolean retainPhantomReferences)
Determines whether phantom references should be considered for full GC.
|
HeapDumpOptions |
retainSoftReferences(boolean retainSoftReferences)
Determines whether soft references should be considered for full GC.
|
HeapDumpOptions |
retainWeakReferences(boolean retainWeakReferences)
Determines whether weak references should be considered for full GC.
|
HeapDumpOptions |
selectRecorded(boolean selectRecorded)
Determines whether recorded objects should be selected when the heap dump is opened in the JProfiler GUI.
|
public static final HeapDumpOptions DEFAULT
Controller.triggerHeapDump()
. This uses the default options described above.public static final HeapDumpOptions SELECT_RECORDED
DEFAULT
, only with selectRecorded(true)
.public static final HeapDumpOptions NO_FULL_GC
DEFAULT
, only with fullGc(false)
.public HeapDumpOptions()
public HeapDumpOptions fullGc(boolean fullGc)
true
.fullGc
- the new valuepublic HeapDumpOptions primitiveData(boolean primitiveData)
true
.primitiveData
- the new valuepublic HeapDumpOptions calculateRetainedSizes(boolean calculateRetainedSizes)
true
.calculateRetainedSizes
- the new valuepublic HeapDumpOptions selectRecorded(boolean selectRecorded)
false
.selectRecorded
- the new valuepublic HeapDumpOptions retainSoftReferences(boolean retainSoftReferences)
true
.
To remove objects that are only held by soft references, call this method with the argument false
.retainSoftReferences
- whether soft references should be retained in the heap dumpfullGc
public HeapDumpOptions retainWeakReferences(boolean retainWeakReferences)
false
.
To retain objects that are only held by weak references, call this method with the argument true
.retainWeakReferences
- whether weak references should be retained in the heap dumpfullGc
public HeapDumpOptions retainPhantomReferences(boolean retainPhantomReferences)
false
.
To retain objects that are only held by phantom references, call this method with the argument true
.retainPhantomReferences
- whether phantom references should be retained in the heap dumpfullGc
public HeapDumpOptions retainFinalizerReferences(boolean retainFinalizerReferences)
false
.
To retain objects that are only held by finalizer references, call this method with the argument true
.retainFinalizerReferences
- whether finalizer references should be retained in the heap dumpfullGc
public boolean isRetainSoftReferences()
fullGc
public boolean isRetainWeakReferences()
fullGc
public boolean isRetainPhantomReferences()
fullGc
public boolean isRetainFinalizerReferences()
fullGc
public boolean isFullGc()
public boolean isPrimitiveData()
public boolean isCalculateRetainedSizes()
public boolean isSelectRecorded()
public HeapDumpOptions freeze()
UnsupportedOperationException
.