org.web3d.vrml.nodes.loader
Class MemCacheLoadManager
java.lang.Object
org.web3d.vrml.nodes.loader.AbstractLoadManager
org.web3d.vrml.nodes.loader.MemCacheLoadManager
- All Implemented Interfaces:
- ExternalLoadManager, org.web3d.vrml.nodes.loader.LoadConstants, VRMLUrlListener
- public class MemCacheLoadManager
- extends AbstractLoadManager
A manager for loading files that are external to the currently loading file
eg Textures, inlines and protos.
The loader is given a scene and told to start loading the contents. During
this time items progress from pending to loading to loaded. The load manager
is cancelable so that a particular scene can be interrupted part way through
loading. The manager is designed to load multiple scenes in parallel or to
have parallel instances of this manager loading data.
This implementation has two memory constraints - the maximum allocated by
the user and total constraints by the JVM. If the user specifies more memory
for caching than the JVM will allow, we have to make do. For this, we use
the standard WeakHashMap so that files that are consuming memory and not
used can be discarded by the VM.
Properties
The following properties are used by this class
org.web3d.vrml.nodes.loader.cache.mem.size The amount of
memory in Kilobytes (integer value) to allocate to in-memory file
caching. If the value is zero or less, no caching is performed.
Note Sort order is not implemented yet.
- Version:
- $Revision: 1.12 $
- Author:
- Justin Couch
|
Constructor Summary |
MemCacheLoadManager()
Create a new load manager initialised with the content loading threads
ready to work. |
|
Method Summary |
protected org.web3d.vrml.nodes.loader.FileCache |
getCache()
Request to fetch the cache used by the derived type. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemCacheLoadManager
public MemCacheLoadManager()
- Create a new load manager initialised with the content loading threads
ready to work.
getCache
protected org.web3d.vrml.nodes.loader.FileCache getCache()
- Request to fetch the cache used by the derived type.
- Specified by:
getCache in class AbstractLoadManager
- Returns:
- The file cache instance
Copyright © 2001 - 2005 Web3D Consortium