Class WeakRefFileCache

java.lang.Object
org.xj3d.impl.core.loading.WeakRefFileCache
All Implemented Interfaces:
FileCache

public class WeakRefFileCache extends Object implements FileCache
The file cache implementation uses the standard WeakHashMap as the storage mechanism.

Items are stored in the WeakHashMap so that when an item no longer needs data, that item can be discarded.

The internal implementation is thread safe, choosing to synchronize on the internal mapping structures. This prevents one thread from loading something into the cache and then having another thread interrupt it half way through and get bogus data.

Version:
$Revision: 1.1 $
Author:
Justin Couch