|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lapetus_ltd.api.common.TLptsMemoryInfo
public class TLptsMemoryInfo
Class Description : This is a class made for monitoring the memory.
The toolbox can be used for instantiating with TLptsSysInfoUtil.getMemoryInfo()
.
$LastChangedRevision: 1182 $
$LastChangedDate:: 2010-11-15 16:01:51#$
Constructor Summary | |
---|---|
TLptsMemoryInfo()
Default Constructor sets the current system total, maximum and free memory in MBytes. |
Method Summary | |
---|---|
double |
getFreeMemoryInMb()
Get Application Free Memory in MBytes. |
double |
getMaxMemoryInMb()
Get Application Max Memory. |
java.lang.String |
getMemoryString(double value,
java.lang.String format)
Formats the string for output on the GUI. |
long |
getTime()
Get Current DateTime in long format. |
java.lang.String |
getTimeString()
Gets the timestamp at the time of the memory information. |
double |
getTotalMemoryInMb()
Get application total memory in MBytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLptsMemoryInfo()
Default Constructor sets the current system total, maximum and free memory in MBytes.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
public void actionPerformed(ActionEvent e) { TLptsMemoryInfo mi = new TLptsMemoryInfo(); String maxMemory = mi.getMemoryString(mi.getMaxMemoryInMb(), "#####.0000"); String totalMemory = mi.getMemoryString(mi.getTotalMemoryInMb(), "#####.0000"); String freeMemory = mi.getMemoryString(mi.getFreeMemoryInMb(), "#####.0000"); Timestamp dateTime = new Timestamp(mi.getTime()); //Or String time = mi.getTimeString(); } Result:63,5625 4,9375 4,3906 2010-07-08 10:58:55.493 10:58:55.493
Method Detail |
---|
public double getFreeMemoryInMb()
Get Application Free Memory in MBytes.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : No
Notes :
Example :
public void actionPerformed(ActionEvent e) { TLptsMemoryInfo mi = new TLptsMemoryInfo(); String maxMemory = mi.getMemoryString(mi.getMaxMemoryInMb(), "#####.0000"); String totalMemory = mi.getMemoryString(mi.getTotalMemoryInMb(), "#####.0000"); String freeMemory = mi.getMemoryString(mi.getFreeMemoryInMb(), "#####.0000"); Timestamp dateTime = new Timestamp(mi.getTime()); //Or String time = mi.getTimeString(); } Result:63,5625 4,9375 4,3906 2010-07-08 10:58:55.493 10:58:55.493
public double getMaxMemoryInMb()
Get Application Max Memory.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : No
Notes :
Example :
public void actionPerformed(ActionEvent e) { TLptsMemoryInfo mi = new TLptsMemoryInfo(); String maxMemory = mi.getMemoryString(mi.getMaxMemoryInMb(), "#####.0000"); String totalMemory = mi.getMemoryString(mi.getTotalMemoryInMb(), "#####.0000"); String freeMemory = mi.getMemoryString(mi.getFreeMemoryInMb(), "#####.0000"); Timestamp dateTime = new Timestamp(mi.getTime()); //Or String time = mi.getTimeString(); } Result:63,5625 4,9375 4,3906 2010-07-08 10:58:55.493 10:58:55.493
public java.lang.String getMemoryString(double value, java.lang.String format)
Formats the string for output on the GUI.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
public void actionPerformed(ActionEvent e) { TLptsMemoryInfo mi = new TLptsMemoryInfo(); String maxMemory = mi.getMemoryString(mi.getMaxMemoryInMb(), "#####.0000"); String totalMemory = mi.getMemoryString(mi.getTotalMemoryInMb(), "#####.0000"); String freeMemory = mi.getMemoryString(mi.getFreeMemoryInMb(), "#####.0000"); Timestamp dateTime = new Timestamp(mi.getTime()); //Or String time = mi.getTimeString(); } Result:63,5625 4,9375 4,3906 2010-07-08 10:58:55.493 10:58:55.493 *
value
- The value to format into a string.format
- 0000.0000 = 0123.1230, #####.#### = 123.123.
public long getTime()
Get Current DateTime in long format.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : No
Notes :
Example :
public void actionPerformed(ActionEvent e) { TLptsMemoryInfo mi = new TLptsMemoryInfo(); String maxMemory = mi.getMemoryString(mi.getMaxMemoryInMb(), "#####.0000"); String totalMemory = mi.getMemoryString(mi.getTotalMemoryInMb(), "#####.0000"); String freeMemory = mi.getMemoryString(mi.getFreeMemoryInMb(), "#####.0000"); Timestamp dateTime = new Timestamp(mi.getTime()); //Or String time = mi.getTimeString(); } Result:63,5625 4,9375 4,3906 2010-07-08 10:58:55.493 10:58:55.493 *
public java.lang.String getTimeString()
Gets the timestamp at the time of the memory information.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : N/A
Notes :
Example :
public void actionPerformed(ActionEvent e) { TLptsMemoryInfo mi = new TLptsMemoryInfo(); String maxMemory = mi.getMemoryString(mi.getMaxMemoryInMb(), "#####.0000"); String totalMemory = mi.getMemoryString(mi.getTotalMemoryInMb(), "#####.0000"); String freeMemory = mi.getMemoryString(mi.getFreeMemoryInMb(), "#####.0000"); Timestamp dateTime = new Timestamp(mi.getTime()); //Or String time = mi.getTimeString(); } Result:63,5625 4,9375 4,3906 2010-07-08 10:58:55.493 10:58:55.493 *
public double getTotalMemoryInMb()
Get application total memory in MBytes.
Thread Safe : Yes
Spawns its own Thread : No
May Return NULL : No
Notes :
Example :
public void actionPerformed(ActionEvent e) { TLptsMemoryInfo mi = new TLptsMemoryInfo(); String maxMemory = mi.getMemoryString(mi.getMaxMemoryInMb(), "#####.0000"); String totalMemory = mi.getMemoryString(mi.getTotalMemoryInMb(), "#####.0000"); String freeMemory = mi.getMemoryString(mi.getFreeMemoryInMb(), "#####.0000"); Timestamp dateTime = new Timestamp(mi.getTime()); //Or String time = mi.getTimeString(); } Result:63,5625 4,9375 4,3906 2010-07-08 10:58:55.493 10:58:55.493
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |