com.plumtree.portaluiinfrastructure.application
Class PTGarbageCollectorRunnable

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.application.PTGarbageCollectorRunnable

public class PTGarbageCollectorRunnable
extends java.lang.Object

This class calls the garbage collector at regular intervals. This is wrapped in a thread so it can be interrupted. Thread priority is controlled by the thread class itself and can be set. Interval in milliseconds between gc's can be set. Teh shutdown boolean is used by the app server to terminate the thread.

Author:
DavidP
See Also:
PTGarbageCollectorThread

Constructor Summary
PTGarbageCollectorRunnable()
          Code executed in a thread to call garbage collector at regular intervals.
 
Method Summary
 long getGarbageCollectInterval()
          Gets the interval in milliseconds between garbage collections.
 boolean isShutDown()
          Tests the value of the shutDown boolean.
 void run()
           
 void setGarbageCollectInterval(long i)
          Sets the interval for garbage collection in milliseconds.
 void setShutDown(boolean b)
          Sets the shut down boolean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTGarbageCollectorRunnable

public PTGarbageCollectorRunnable()
Code executed in a thread to call garbage collector at regular intervals.

Method Detail

run

public void run()

getGarbageCollectInterval

public long getGarbageCollectInterval()
Gets the interval in milliseconds between garbage collections.

Returns:

isShutDown

public boolean isShutDown()
Tests the value of the shutDown boolean. If true, the thread will shut itself down.

Returns:

setGarbageCollectInterval

public void setGarbageCollectInterval(long i)
Sets the interval for garbage collection in milliseconds. Maximum is 23 days.

Parameters:
i -

setShutDown

public void setShutDown(boolean b)
Sets the shut down boolean. When true, the thread terminates itself.

Parameters:
b -



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.