org.processmining.framework.log.rfb.io
Class ManagedRandomAccessFile.ShutdownHook

java.lang.Object
  extended by java.lang.Thread
      extended by org.processmining.framework.log.rfb.io.ManagedRandomAccessFile.ShutdownHook
All Implemented Interfaces:
java.lang.Runnable
Enclosing class:
ManagedRandomAccessFile

protected static class ManagedRandomAccessFile.ShutdownHook
extends java.lang.Thread

This class implements a shutdown hook, which will clear all files backing instances of the enclosing class from the file system at the moment, at which the JVM shuts down.

Author:
Christian W. Guenther (christian at deckfour dot org)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
protected  java.lang.String tmpFileRegEx
          Regular expression to match temporary file names.
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
protected ManagedRandomAccessFile.ShutdownHook()
           
 
Method Summary
 void run()
          This method is invoked in a dedicated thread by the virtual machine, before it attempts shutdown.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, 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
 

Field Detail

tmpFileRegEx

protected java.lang.String tmpFileRegEx
Regular expression to match temporary file names.

Constructor Detail

ManagedRandomAccessFile.ShutdownHook

protected ManagedRandomAccessFile.ShutdownHook()
Method Detail

run

public void run()
This method is invoked in a dedicated thread by the virtual machine, before it attempts shutdown. It will attempt to delete all temporary files used by ATERandomFileBuffer from the file system.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread