com.jogamp.common.util.cache
Class TempFileCache

java.lang.Object
  extended by com.jogamp.common.util.cache.TempFileCache

public class TempFileCache
extends Object


Constructor Summary
TempFileCache()
           
 
Method Summary
 File getBaseDir()
          Base temp directory used by TempFileCache.
 File getRootDir()
          Root temp directory for this JVM instance.
 File getTempDir()
          Temporary directory for individual files (eg.
static boolean initSingleton()
          Documented way to kick off static initialization
 boolean isValid()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TempFileCache

public TempFileCache()
Method Detail

initSingleton

public static boolean initSingleton()
Documented way to kick off static initialization

Returns:
true is static initialization was successful

isValid

public boolean isValid()
Returns:
true is static and object initialization was successful

getBaseDir

public File getBaseDir()
Base temp directory used by TempFileCache. Lifecycle: For all JVMs, ClassLoader and times. This is set to: ${java.io.tmpdir}/

Returns:

getRootDir

public File getRootDir()
Root temp directory for this JVM instance. Used to store individual directories. Lifecycle: For all JVMs and ClassLoader / Use Case: Per ClassLoader files, eg. native libraries. Old temp directories are cleaned up the next time a JVM is launched that uses TempFileCache.

Returns:

getTempDir

public File getTempDir()
Temporary directory for individual files (eg. native libraries of one ClassLoader instance). The directory name is: Lifecycle: Within each JVM .. use case dependent, ie. per ClassLoader /jlnMMMMM where jlnMMMMM is the unique filename created by File.createTempFile() without the ".tmp" extension.

Returns: