jsysmon
Class MemoryMonitoringData

java.lang.Object
  extended byjsysmon.MemoryMonitoringData

public class MemoryMonitoringData
extends java.lang.Object

This Class stores the Memory Information values. Indexes used has to be one of the constants defined as *_INDEX. Data are stored in Bytes.

Author:
Francois-Xavier Detourniere

Field Summary
static int BUFFERS_MEM_INDEX
          Index of Physical Memory Size used for Buffers
static int CACHED_MEM_INDEX
          Index of Physical Memory Size used for Cache
static int CACHED_SWAP_INDEX
          Index of Swap Memory Size used for Cache
static int FREE_MEM_INDEX
          Index of Free Physical Memory Size
static int FREE_SWAP_INDEX
          Index of Free Swap Size
static int NB_INDEXES
          Number of indexes Keep this value up to date
static int TOTAL_MEM_INDEX
          Index of Total Physical Memory Size
static int TOTAL_SWAP_INDEX
          Index of Total Swap Size
static long[] usages
          Array storing all the values.
static int USED_MEM_INDEX
          Index of Used Physical Memory Size
static int USED_SWAP_INDEX
          Index of Used Swap Size
 
Constructor Summary
MemoryMonitoringData()
          Initializes usages array
 
Method Summary
 long getUsage(int index)
          Return the usage given in parameter.
 long[] getUsages()
          Returns the usages array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOTAL_MEM_INDEX

public static final int TOTAL_MEM_INDEX
Index of Total Physical Memory Size

See Also:
Constant Field Values

USED_MEM_INDEX

public static final int USED_MEM_INDEX
Index of Used Physical Memory Size

See Also:
Constant Field Values

FREE_MEM_INDEX

public static final int FREE_MEM_INDEX
Index of Free Physical Memory Size

See Also:
Constant Field Values

BUFFERS_MEM_INDEX

public static final int BUFFERS_MEM_INDEX
Index of Physical Memory Size used for Buffers

See Also:
Constant Field Values

CACHED_MEM_INDEX

public static final int CACHED_MEM_INDEX
Index of Physical Memory Size used for Cache

See Also:
Constant Field Values

TOTAL_SWAP_INDEX

public static final int TOTAL_SWAP_INDEX
Index of Total Swap Size

See Also:
Constant Field Values

USED_SWAP_INDEX

public static final int USED_SWAP_INDEX
Index of Used Swap Size

See Also:
Constant Field Values

FREE_SWAP_INDEX

public static final int FREE_SWAP_INDEX
Index of Free Swap Size

See Also:
Constant Field Values

CACHED_SWAP_INDEX

public static final int CACHED_SWAP_INDEX
Index of Swap Memory Size used for Cache

See Also:
Constant Field Values

NB_INDEXES

public static final int NB_INDEXES
Number of indexes Keep this value up to date

See Also:
Constant Field Values

usages

public static long[] usages
Array storing all the values. Indexes in this array are one of the *_INDEX declared in this Class

Constructor Detail

MemoryMonitoringData

public MemoryMonitoringData()
Initializes usages array

Method Detail

getUsages

public long[] getUsages()
Returns the usages array. Values in the returned array can be accessed using *_INDEX declared in this Class

Returns:
usages array

getUsage

public long getUsage(int index)
              throws java.lang.ArrayIndexOutOfBoundsException
Return the usage given in parameter. Usage must be one of *_INDEX declared in this Class

Parameters:
index -
Returns:
Asked Usage
Throws:
java.lang.ArrayIndexOutOfBoundsException - if index >= NB_INDEXES