edu.columbia.cs.util
Class DeleteFilesThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--edu.columbia.cs.util.DeleteFilesThread
All Implemented Interfaces:
java.lang.Runnable

public class DeleteFilesThread
extends java.lang.Thread

Periodically deletes the files and subdirectories in a specified directory older than one hour old. The default sleep time is 3600000 secs.


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DeleteFilesThread(java.lang.String dir)
          Constructs a new DeleteFilesThread with a specified directory whose contents to delete.
DeleteFilesThread(java.lang.String dir, int time)
          Constructs a new DeleteFilesThread with a specified directory whose contents to delete and a specified sleep time.
 
Method Summary
 void run()
          Starts the thread.
 void stopThread()
          Stops the thread.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DeleteFilesThread

public DeleteFilesThread(java.lang.String dir)
Constructs a new DeleteFilesThread with a specified directory whose contents to delete.
Parameters:
dir - the directory to delete

DeleteFilesThread

public DeleteFilesThread(java.lang.String dir,
                         int time)
Constructs a new DeleteFilesThread with a specified directory whose contents to delete and a specified sleep time.
Parameters:
dir - the directory to delete
time - the time to sleep
Method Detail

run

public void run()
Starts the thread.
Overrides:
run in class java.lang.Thread

stopThread

public void stopThread()
Stops the thread.