j3d.org Code

org.j3d.texture
Interface TextureCacheFactory


public interface TextureCacheFactory

Abstract representation of what a factory for texture caches would look like.

Different types of cache implementations are allowed (ie different ways of deciding when an texture no longer needs to be in the cache).

The factory also supports the concept of the "default cache". This is used when you want a simple system that doesn't really care about the cache type used and just wants to use this class as a global singleton for storing the texture information. The default cache type can be controlled through either directly setting the value in this class, or using a system property. By defining a value for the property

   org.j3d.texture.DefaultCacheType
 
with one of the values (case-sensitive) fixed, lru or weakref. Setting the type through the method call will override this setting. However, the cache type can only be set once. All further attempts will result in an exception.

Version:
$Revision: 1.2 $
Author:
Justin Couch

Field Summary
static java.lang.String DEFAULT_CACHE_PROP
          The system property name
static int FIXED_CACHE
          ID for a fixed contents cache implementation
static int LAST_CACHE_ID
          The last ID for global, inbuilt cache types
static int LRU_CACHE
          ID for a Least-Recently-Used cache implementation
static int WEAKREF_CACHE
          ID for a cache implementation using weak references
 

Field Detail

FIXED_CACHE

static final int FIXED_CACHE
ID for a fixed contents cache implementation

See Also:
Constant Field Values

LRU_CACHE

static final int LRU_CACHE
ID for a Least-Recently-Used cache implementation

See Also:
Constant Field Values

WEAKREF_CACHE

static final int WEAKREF_CACHE
ID for a cache implementation using weak references

See Also:
Constant Field Values

LAST_CACHE_ID

static final int LAST_CACHE_ID
The last ID for global, inbuilt cache types

See Also:
Constant Field Values

DEFAULT_CACHE_PROP

static final java.lang.String DEFAULT_CACHE_PROP
The system property name

See Also:
Constant Field Values

j3d.org Code

Latest Info from http://code.j3d.org/
Copyright © 2001 - j3d.org