Package com.jprofiler.api.controller
Class HeapDumpOptions
- java.lang.Object
-
- com.jprofiler.api.controller.HeapDumpOptions
-
public class HeapDumpOptions extends java.lang.ObjectHeap dump options for callingController.triggerHeapDump(HeapDumpOptions)The default values after constructing an instance of this class are equivalent to callingheapDumpOptions.fullGc(true).primitiveData(true).calculateRetainedSizes(true).selectRecorded(true).
-
-
Field Summary
Fields Modifier and Type Field Description static HeapDumpOptionsDEFAULTThe default value used byController.triggerHeapDump().static HeapDumpOptionsNO_FULL_GCSame asDEFAULT, only withfullGc(false).static HeapDumpOptionsSELECT_RECORDEDSame asDEFAULT, only withselectRecorded(true).
-
Constructor Summary
Constructors Constructor Description HeapDumpOptions()Create a new instance with the default options described above.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HeapDumpOptionscalculateRetainedSizes(boolean calculateRetainedSizes)Determines whether retained sizes should be calculated for the heap dump.HeapDumpOptionsfreeze()Make these heap dump options unmodifiable.HeapDumpOptionsfullGc(boolean fullGc)Determines whether a full garbage collection should be performed for the heap dump.booleanisCalculateRetainedSizes()Returns if retained sizes should be calculated for the heap dump.booleanisFullGc()Returns if a full garbage collection should be performed for the heap dump.booleanisPrimitiveData()Returns if primitive data should be recorded for the heap dump.booleanisRetainFinalizerReferences()Returns if finalizer references should retain objects in heap dump if full GC is selected.booleanisRetainPhantomReferences()Returns if phantom references should retain objects in heap dump if full GC is selected.booleanisRetainSoftReferences()Returns if soft references should retain objects in heap dump if full GC is selected.booleanisRetainWeakReferences()Returns if weak references should retain objects in heap dump if full GC is selected.booleanisSelectRecorded()Returns if recorded objects should be selected when the heap dump is opened in the JProfiler GUI.HeapDumpOptionsprimitiveData(boolean primitiveData)Determines whether primitive data should be recorded for the heap dump.HeapDumpOptionsretainFinalizerReferences(boolean retainFinalizerReferences)Determines whether finalizer references should be considered for full GC.HeapDumpOptionsretainPhantomReferences(boolean retainPhantomReferences)Determines whether phantom references should be considered for full GC.HeapDumpOptionsretainSoftReferences(boolean retainSoftReferences)Determines whether soft references should be considered for full GC.HeapDumpOptionsretainWeakReferences(boolean retainWeakReferences)Determines whether weak references should be considered for full GC.HeapDumpOptionsselectRecorded(boolean selectRecorded)Determines whether recorded objects should be selected when the heap dump is opened in the JProfiler GUI.
-
-
-
Field Detail
-
DEFAULT
public static final HeapDumpOptions DEFAULT
The default value used byController.triggerHeapDump(). This uses the default options described above.
-
SELECT_RECORDED
public static final HeapDumpOptions SELECT_RECORDED
Same asDEFAULT, only withselectRecorded(true).
-
NO_FULL_GC
public static final HeapDumpOptions NO_FULL_GC
Same asDEFAULT, only withfullGc(false).
-
-
Method Detail
-
fullGc
public HeapDumpOptions fullGc(boolean fullGc)
Determines whether a full garbage collection should be performed for the heap dump. The default istrue.- Parameters:
fullGc- the new value- Returns:
- this instance
-
primitiveData
public HeapDumpOptions primitiveData(boolean primitiveData)
Determines whether primitive data should be recorded for the heap dump. The default istrue.- Parameters:
primitiveData- the new value- Returns:
- this instance
-
calculateRetainedSizes
public HeapDumpOptions calculateRetainedSizes(boolean calculateRetainedSizes)
Determines whether retained sizes should be calculated for the heap dump. The default istrue.- Parameters:
calculateRetainedSizes- the new value- Returns:
- this instance
-
selectRecorded
public HeapDumpOptions selectRecorded(boolean selectRecorded)
Determines whether recorded objects should be selected when the heap dump is opened in the JProfiler GUI. The default value isfalse.- Parameters:
selectRecorded- the new value- Returns:
- this instance
-
retainSoftReferences
public HeapDumpOptions retainSoftReferences(boolean retainSoftReferences)
Determines whether soft references should be considered for full GC. The default value istrue. To remove objects that are only held by soft references, call this method with the argumentfalse.- Parameters:
retainSoftReferences- whether soft references should be retained in the heap dump- Returns:
- this instance
- See Also:
fullGc
-
retainWeakReferences
public HeapDumpOptions retainWeakReferences(boolean retainWeakReferences)
Determines whether weak references should be considered for full GC. The default value isfalse. To retain objects that are only held by weak references, call this method with the argumenttrue.- Parameters:
retainWeakReferences- whether weak references should be retained in the heap dump- Returns:
- this instance
- See Also:
fullGc
-
retainPhantomReferences
public HeapDumpOptions retainPhantomReferences(boolean retainPhantomReferences)
Determines whether phantom references should be considered for full GC. The default value isfalse. To retain objects that are only held by phantom references, call this method with the argumenttrue.- Parameters:
retainPhantomReferences- whether phantom references should be retained in the heap dump- Returns:
- this instance
- See Also:
fullGc
-
retainFinalizerReferences
public HeapDumpOptions retainFinalizerReferences(boolean retainFinalizerReferences)
Determines whether finalizer references should be considered for full GC. The default value isfalse. To retain objects that are only held by finalizer references, call this method with the argumenttrue.- Parameters:
retainFinalizerReferences- whether finalizer references should be retained in the heap dump- Returns:
- this instance
- See Also:
fullGc
-
isFullGc
public boolean isFullGc()
Returns if a full garbage collection should be performed for the heap dump.- Returns:
- the value
-
isPrimitiveData
public boolean isPrimitiveData()
Returns if primitive data should be recorded for the heap dump.- Returns:
- the value
-
isCalculateRetainedSizes
public boolean isCalculateRetainedSizes()
Returns if retained sizes should be calculated for the heap dump.- Returns:
- the value
-
isSelectRecorded
public boolean isSelectRecorded()
Returns if recorded objects should be selected when the heap dump is opened in the JProfiler GUI.- Returns:
- the value
-
isRetainSoftReferences
public boolean isRetainSoftReferences()
Returns if soft references should retain objects in heap dump if full GC is selected.- Returns:
- the value
- See Also:
fullGc
-
isRetainWeakReferences
public boolean isRetainWeakReferences()
Returns if weak references should retain objects in heap dump if full GC is selected.- Returns:
- the value
- See Also:
fullGc
-
isRetainPhantomReferences
public boolean isRetainPhantomReferences()
Returns if phantom references should retain objects in heap dump if full GC is selected.- Returns:
- the value
- See Also:
fullGc
-
isRetainFinalizerReferences
public boolean isRetainFinalizerReferences()
Returns if finalizer references should retain objects in heap dump if full GC is selected.- Returns:
- the value
- See Also:
fullGc
-
freeze
public HeapDumpOptions freeze()
Make these heap dump options unmodifiable. Further modification attempts will result in aUnsupportedOperationException.- Returns:
- this instance
-
-