Package org.eclipse.mat.snapshot
Class SnapshotInfo
- java.lang.Object
-
- org.eclipse.mat.snapshot.SnapshotInfo
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
XSnapshotInfo
public class SnapshotInfo extends Object implements Serializable
Class describing anISnapshot. Each snapshot has some core data, like the date when it was acquired/parsed, the number of objects inside... This data is available with the snapshot info which is usually serialized along with the snapshot.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SnapshotInfo(String path, String jvmInfo, int identifierSize, Date creationDate, int numberOfObjects, int numberOfGCRoots, int numberOfClasses, int numberOfClassLoaders, long usedHeapSize)Deprecated.SnapshotInfo(String path, String prefix, String jvmInfo, int identifierSize, Date creationDate, int numberOfObjects, int numberOfGCRoots, int numberOfClasses, int numberOfClassLoaders, long usedHeapSize)Construct a snapshot info.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetCreationDate()Get date when the snapshot was acquired/parsed.intgetIdentifierSize()Get size of the internal identifiers in the heap dump, i.e.StringgetJvmInfo()Get version of the JVM from which it was acquired.intgetNumberOfClasses()Get number of Java Classes found in the snapshot.intgetNumberOfClassLoaders()Get number of ClassLoaders found in the snapshotintgetNumberOfGCRoots()Get number of GC roots found in the snapshot.intgetNumberOfObjects()Get number of Java objects found in the snapshot.StringgetPath()Get the absolute path of the heap dump file.StringgetPrefix()Get the common prefix used to name all additional (e.g.SerializablegetProperty(String name)Get extra information about the snapshotlonggetUsedHeapSize()Get number of bytes used in the heap (the allocated memory may be higher)SerializablesetProperty(String name, Serializable value)Store extra information about the snapshotStringtoString()
-
-
-
Constructor Detail
-
SnapshotInfo
public SnapshotInfo(String path, String prefix, String jvmInfo, int identifierSize, Date creationDate, int numberOfObjects, int numberOfGCRoots, int numberOfClasses, int numberOfClassLoaders, long usedHeapSize)
Construct a snapshot info.- Parameters:
path- path from where the snapshot was acquiredjvmInfo- version of the JVM from which it was acquiredidentifierSize- size of the internal identifiers in the heap dump, i.e. 32 or 64 bitcreationDate- date when the snapshot was acquired/parsednumberOfObjects- number of Java objects found in the snapshotnumberOfGCRoots- number of GC roots found in the snapshotnumberOfClasses- number of Java Classes found in the snapshotnumberOfClassLoaders- number of ClassLoaders found in the snapshotusedHeapSize- number of bytes used in the heap (the allocated memory may be higher)
-
SnapshotInfo
@Deprecated public SnapshotInfo(String path, String jvmInfo, int identifierSize, Date creationDate, int numberOfObjects, int numberOfGCRoots, int numberOfClasses, int numberOfClassLoaders, long usedHeapSize)
Deprecated.
-
-
Method Detail
-
getProperty
public Serializable getProperty(String name)
Get extra information about the snapshot- Parameters:
name- keep_unreachable_objects -GCRootInfo.Typehprof.version org.eclipse.mat.snapshot.UnreachableObjectsHistogram $heapFormat- Returns:
- the extra (serializable) information
-
setProperty
public Serializable setProperty(String name, Serializable value)
Store extra information about the snapshot- Parameters:
name-value- keep_unreachable_objects - mark asGCRootInfo.Typehprof.version org.eclipse.mat.snapshot.UnreachableObjectsHistogram $heapFormat- Returns:
- the previous extra (serializable) information, or null
-
getPath
public String getPath()
Get the absolute path of the heap dump file.- Returns:
- absolute path of the heap dump file.
-
getPrefix
public String getPrefix()
Get the common prefix used to name all additional (e.g. index) files. The prefix includes the directory path.- Returns:
- common prefix used to name additional files
-
getJvmInfo
public String getJvmInfo()
Get version of the JVM from which it was acquired.- Returns:
- version of the JVM from which it was acquired
-
getIdentifierSize
public int getIdentifierSize()
Get size of the internal identifiers in the heap dump, i.e. 32 or 64 bit, in bytes.- Returns:
- size of the internal identifiers in the heap dump, i.e. 32 or 64 bit
-
getCreationDate
public Date getCreationDate()
Get date when the snapshot was acquired/parsed.- Returns:
- creation date, or
nullif the creation date is not known
-
getNumberOfObjects
public int getNumberOfObjects()
Get number of Java objects found in the snapshot.- Returns:
- number of Java objects found in the snapshot
-
getNumberOfGCRoots
public int getNumberOfGCRoots()
Get number of GC roots found in the snapshot.- Returns:
- number of GC roots found in the snapshot
-
getNumberOfClasses
public int getNumberOfClasses()
Get number of Java Classes found in the snapshot.- Returns:
- number of Java Classes found in the snapshot
-
getNumberOfClassLoaders
public int getNumberOfClassLoaders()
Get number of ClassLoaders found in the snapshot- Returns:
- number of ClassLoaders found in the snapshot
-
getUsedHeapSize
public long getUsedHeapSize()
Get number of bytes used in the heap (the allocated memory may be higher)- Returns:
- number of bytes used in the heap (the allocated memory may be higher)
-
-