Update of /cvsroot/javaprofiler/jpiimpl/net/sourceforge/javaprofiler/jpiimpl/data
In directory usw-pr-cvs1:/tmp/cvs-serv30733
Added Files:
GCRunData.java
Log Message:
GCData renamed
--- NEW FILE: GCRunData.java ---
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License Version
* 1.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is available at http://www.sun.com/
*
* The Original Code is the Java Profiler module.
* The Initial Developers of the Original Code are Jan Stola, Pavel Vacha,
* Michal Pise, Petr Luner, Lukas Petru and Marek Przeczek.
* Portions created by Jan Stola are Copyright (C) 2000-2001. All Rights Reserved.
* Portions created by Pavel Vacha are Copyright (C) 2000-2001. All Rights Reserved.
* Portions created by Michal Pise are Copyright (C) 2000-2001. All Rights Reserved.
* Portions created by Petr Luner are Copyright (C) 2000-2001. All Rights Reserved.
* Portions created by Lukas Petru are Copyright (C) 2000-2001. All Rights Reserved.
* Portions created by Marek Przeczek are Copyright (C) 2000-2001. All Rights Reserved.
*
* Contributors: Jan Stola, Pavel Vacha, Michal Pise, Petr Luner,
* Lukas Petru and Marek Przeczek.
*/
package net.sourceforge.javaprofiler.jpiimpl.data;
import java.util.*;
import net.sourceforge.javaprofiler.jpiimpl.commun.*;
import net.sourceforge.javaprofiler.jpi.*;
/**
* Data about one GC session.
*
* @author Jan Stola
*/
public class GCRunData extends IDObjectData implements GCRunRef {
/** Number of used objects on the heap. */
private long usedObjects;
/** Amount of space used by the objects (in bytes). */
private long usedSpace;
/** Total amount of object space (in bytes). */
private long totalSpace;
/** Time when GC started. */
private Date startTime;
/** Time when GC finished. */
private Date endTime;
/**
* Creates new GCData.
*
* @param ID unique ID of this object.
* @param usedObjects number of used objects on the heap.
* @param usedSpace amount of space used by the objects (in bytes).
* @param totalSpace total amount of object space (in bytes).
* @param startTime time when GC started.
* @param endTime time when GC finished.
*/
GCRunData(Integer ID, long usedObjects, long usedSpace, long totalSpace, Date startTime, Date endTime) {
super(ID);
this.usedObjects=usedObjects;
this.usedSpace=usedSpace;
this.totalSpace=totalSpace;
this.startTime= startTime;
this.endTime=endTime;
}
/**
* Creates new GCData.
*
* @param sid data returned by communication layer
*/
GCRunData(IProf.sID sid) {
this( new Integer(sid.objId), ((IProf.sGCInfo)sid.info).usedObjects,
((IProf.sGCInfo)sid.info).usedObjectSpace,
((IProf.sGCInfo)sid.info).totalObjectSpace,
((IProf.sGCInfo)sid.info).startTime,
((IProf.sGCInfo)sid.info).endTime);
}
/**
* Returns number of used objects on the heap.
*
* @return number of used objects on the heap.
*/
public long getUsedObjectsCount() {
return usedObjects;
}
/**
* Returns amount of space used by the objects (in bytes).
*
* @return amount of space used by the objects (in bytes).
*/
public long getUsedSpace() {
return usedSpace;
}
/**
* Returns total amount of object space (in bytes).
*
* @return total amount of object space (in bytes).
*/
public long getTotalSpace() {
return totalSpace;
}
/**
* Returns startTime time when GC started.
*
* @return startTime time when GC started.
*/
public Date getStartTime() {
return startTime;
}
/**
* Returns endTime time when GC finished.
*
* @return endTime time when GC finished.
*/
public Date getEndTime() {
return endTime;
}
}
/*
* $Log: GCRunData.java,v $
* Revision 1.1 2002/06/11 06:56:03 vachis
* GCData renamed
*
* Revision 1.5 2002/03/03 01:20:08 vachis
* type of ID changed from int to Integer
*
* Revision 1.4 2001/12/02 14:48:06 petrul
* changed constructor code
*
* Revision 1.3 2001/11/20 22:23:37 vachis
* Contructors from IProf.sID and monitors statistic info
*
* Revision 1.2 2001/09/29 21:01:33 stolis
* Plural added in licenses.
*
* Revision 1.1.1.1 2001/07/11 22:27:58 stolis
* no message
*
*/
|