org.geotools.coverage
Class CoverageCache

Object
  extended by CoverageCache

public class CoverageCache
extends Object

A cache for coverage instances. Call to reference(org.opengis.coverage.Coverage) method returns a weak or soft reference to the specified coverage. If such a reference previously existed, it is returned. Otherwise a new reference is created.

Since:
2.1
Author:
Martin Desruisseaux (IRD)
Module:

Field Summary
static CoverageCache DEFAULT
          The default, system-wide cache for coverages.
 
Constructor Summary
CoverageCache()
          Creates a new coverage cache.
 
Method Summary
protected  void finalize()
          Cleanup this coverage cache on garbage collection.
 Reference reference(Coverage coverage)
          Returns a reference to the specified coverage.
 
Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final CoverageCache DEFAULT
The default, system-wide cache for coverages.

Constructor Detail

CoverageCache

public CoverageCache()
Creates a new coverage cache.

Method Detail

reference

public Reference reference(Coverage coverage)
Returns a reference to the specified coverage. If weak or soft reference already exists for the specified coverage, then this reference is returned. Otherwise, a weak reference is created and returned.

Parameters:
coverage - The coverage to reference.
Returns:
A weak of a soft reference to the specified coverage.

finalize

protected void finalize()
                 throws Throwable
Cleanup this coverage cache on garbage collection.

Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 1996-2009 Geotools. All Rights Reserved.