GlueGen: com.jogamp.common.util.cache.TempFileCache Class Reference

GlueGen v2.6.0-rc-20250706 GlueGen, Native Binding Generator for Java™ (public API).

Public Member Functions | Static Public Member Functions | List of all members
com.jogamp.common.util.cache.TempFileCache Class Reference
Collaboration diagram for com.jogamp.common.util.cache.TempFileCache:

## Public Member Functions

| TempFileCache ()
| Create the `getTempDir()`. More...
void | destroy ()
| Delete the `getTempDir()` recursively and remove it's reference. More...
boolean | isValid (final boolean forExecutables)
File | getTempDir ()
| Temporary directory for individual files (eg. More...

## Static Public Member Functions

static boolean | initSingleton ()
| Documented way to kick off static initialization. More...
static File | getBaseDir ()
| Base temp directory used by `TempFileCache`. More...
static File | getRootDir ()
| Root temp directory for this JVM instance. More...

## Detailed Description

Definition at line 42 of file TempFileCache.java.

## Constructor & Destructor Documentation

## ◆ TempFileCache()

com.jogamp.common.util.cache.TempFileCache.TempFileCache | ( |  | ) |

Create the `getTempDir()`.

Definition at line 431 of file TempFileCache.java.

## Member Function Documentation

## ◆ destroy()

void com.jogamp.common.util.cache.TempFileCache.destroy | ( |  | ) |

Delete the `getTempDir()` recursively and remove it's reference.

Definition at line 451 of file TempFileCache.java.

## ◆ getBaseDir()

static File com.jogamp.common.util.cache.TempFileCache.getBaseDir | ( |  | ) |

static

Base temp directory used by `TempFileCache`.

Lifecycle: For one user's concurrently running JVMs and ClassLoader

This is set to:

      ${java.io.tmpdir}/tmpDirPrefix

Returns

Definition at line 493 of file TempFileCache.java.

## ◆ getRootDir()

static File com.jogamp.common.util.cache.TempFileCache.getRootDir | ( |  | ) |

static

Root temp directory for this JVM instance.

Used to store individual directories.

This directory is a sub-folder to `getBaseDir()`.

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

Definition at line 522 of file TempFileCache.java.

## ◆ getTempDir()

File com.jogamp.common.util.cache.TempFileCache.getTempDir | ( |  | ) |

Temporary directory for individual files (eg.

native libraries of one ClassLoader instance).

This directory is a sub-folder to `getRootDir()`.

Lifecycle: Within each JVM .. use case dependent, ie. per ClassLoader and per `TempFileCache` instance!

The directory name is:

      tmpRootDir/jlnMMMMM

where jlnMMMMM is the unique filename created by File.createTempFile() without the ".tmp" extension.

Returns

Definition at line 546 of file TempFileCache.java.

Here is the caller graph for this function:

## ◆ initSingleton()

static boolean com.jogamp.common.util.cache.TempFileCache.initSingleton | ( |  | ) |

static

Documented way to kick off static initialization.

Returns
  true is static initialization was successful

Definition at line 130 of file TempFileCache.java.

Here is the caller graph for this function:

## ◆ isValid()

boolean com.jogamp.common.util.cache.TempFileCache.isValid | ( | final boolean | forExecutables | ) |

Parameters

  forExecutables | if `true`, method also tests whether the underlying `getBaseDir()` is suitable to load native libraries or launch executables

Returns
  true if static and object initialization was successful

See also
  #isTempExecutable()
  isValid()

Definition at line 475 of file TempFileCache.java.

Here is the caller graph for this function:

The documentation for this class was generated from the following file:

- src/java/com/jogamp/common/util/cache/TempFileCache.java