Package com.jogamp.common.util.cache
Class TempFileCache
java.lang.Object
com.jogamp.common.util.cache.TempFileCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Delete theindividualTmpDirrecursively and remove it's reference.Base temp directory used by TempFileCache.Root temp directory for this JVM instance.Temporary directory for individual files (eg.static booleanDocumented way to kick off static initializationbooleanisValid()
-
Constructor Details
-
TempFileCache
public TempFileCache()Create theindividualTmpDir.
-
-
Method Details
-
initSingleton
public static boolean initSingleton()Documented way to kick off static initialization- Returns:
- true is static initialization was successful
-
destroy
public void destroy()Delete theindividualTmpDirrecursively and remove it's reference. -
isValid
public boolean isValid()- Returns:
- true is static and object initialization was successful
-
getBaseDir
Base temp directory used by TempFileCache.Lifecycle: For one user's JVMs, ClassLoader and time.
This is set to:${java.io.tmpdir}/tmpDirPrefix- Returns:
-
getRootDir
Root temp directory for this JVM instance. Used to store individual directories.Lifecycle: For one user's concurrently running JVMs and ClassLoader
tmpBaseDir/tmpRootPropValue
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
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
tmpRootDir/jlnMMMMM
where jlnMMMMM is the unique filename created by File.createTempFile() without the ".tmp" extension.- Returns:
-