org.ow2.jonas.lib.jmbeans.monitoring
Class MemoryMonitoring

java.lang.Object
  extended by org.ow2.jonas.lib.jmbeans.monitoring.MemoryMonitoring
All Implemented Interfaces:
TimerEventListener

public class MemoryMonitoring
extends Object
implements TimerEventListener


Constructor Summary
MemoryMonitoring()
           
 
Method Summary
 boolean getActivated()
           
 int getRange()
          Get range.
 int getSizeTableMeasures()
          Get the size of the table of measures.
 Long[] getTableMeasures()
          Get the table of value.
 TimerManager getTimerManager()
           
 void setActivated(boolean pActivated)
           
 void setRange(int range)
          set range
 void setSizeTableMeasures(int sizeMeasuresTable)
          Set the size of the table of measures
 void setTimerManager(TimerManager timerManager)
           
 void timeoutExpired(Object arg)
          The measures timeout has expired.
 long totalMemory()
          Private function for monitoring.
 long usedMemory()
          private function for monitoring
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryMonitoring

public MemoryMonitoring()
Method Detail

getTableMeasures

public Long[] getTableMeasures()
Get the table of value.

Returns:
Long[] measures table

getActivated

public boolean getActivated()

setActivated

public void setActivated(boolean pActivated)

getRange

public int getRange()
Get range.

Returns:
Integer - range

setRange

public void setRange(int range)
set range

Parameters:
range - range for free memory measurement

getSizeTableMeasures

public int getSizeTableMeasures()
Get the size of the table of measures.

Returns:
Number of measures

setSizeTableMeasures

public void setSizeTableMeasures(int sizeMeasuresTable)
Set the size of the table of measures

Parameters:
sizeMeasuresTable - Number of measures

timeoutExpired

public void timeoutExpired(Object arg)
The measures timeout has expired. Do not synchronize this method to avoid deadlocks!

Specified by:
timeoutExpired in interface TimerEventListener
Parameters:
arg - Object

usedMemory

public long usedMemory()
private function for monitoring

Returns:
long used memory

totalMemory

public long totalMemory()
Private function for monitoring.

Returns:
long total memory

getTimerManager

public TimerManager getTimerManager()

setTimerManager

public void setTimerManager(TimerManager timerManager)


Copyright © 2010 OW2 Consortium. All Rights Reserved.