Protomatter Classes v1.1.6

com.protomatter.util
Class ExpiringSoftReferenceCache

java.lang.Object
  |
  +--com.protomatter.util.SoftReferenceCache
        |
        +--com.protomatter.util.ExpiringSoftReferenceCache
All Implemented Interfaces:
Cache

public class ExpiringSoftReferenceCache
extends SoftReferenceCache

A cache that uses soft references and will also expire cache values after a given period of time.


Constructor Summary
ExpiringSoftReferenceCache(long timeout)
          Create a new timed soft reference cache with the given timeout.
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Get a value from the cache.
 void put(java.lang.Object key, java.lang.Object val)
          Put a value into the cache, possibly clobbering the old value if one exists.
 
Methods inherited from class com.protomatter.util.SoftReferenceCache
clear, clear
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpiringSoftReferenceCache

public ExpiringSoftReferenceCache(long timeout)
Create a new timed soft reference cache with the given timeout.
Method Detail

put

public void put(java.lang.Object key,
                java.lang.Object val)
Put a value into the cache, possibly clobbering the old value if one exists.
Overrides:
put in class SoftReferenceCache

get

public java.lang.Object get(java.lang.Object key)
Get a value from the cache.
Overrides:
get in class SoftReferenceCache
Following copied from class: com.protomatter.util.SoftReferenceCache
Returns:
The cached value, or null if no value exists.

Protomatter Classes v1.1.6
Copyright 1998-2001 Nate Sammons

Protomatter Classes v1.1.6 http://protomatter.sourceforge.net/1.1.6