GigaSpaces XAP 9.7.2 API

com.sun.jini.collection
Class SoftCache

java.lang.Object
  extended by com.sun.jini.collection.SoftCache

public class SoftCache
extends Object

Map of keys to softly-referenced values which automatically removes mappings for garbage-collected values. This is a simplified version of sun.misc.SoftCache.

Since:
2.0
Author:
Sun Microsystems, Inc.

Constructor Summary
SoftCache()
           
 
Method Summary
 void clear()
          Removes all associations from this map.
 Object get(Object key)
          Returns value associated with given key, or null if none.
 Object put(Object key, Object value)
          Associates value with given key, returning value previously associated with key, or null if none.
 Object remove(Object key)
          Removes association for given key, returning value previously associated with key, or null if none.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SoftCache

public SoftCache()
Method Detail

put

public Object put(Object key,
                  Object value)
Associates value with given key, returning value previously associated with key, or null if none.


get

public Object get(Object key)
Returns value associated with given key, or null if none.


remove

public Object remove(Object key)
Removes association for given key, returning value previously associated with key, or null if none.


clear

public void clear()
Removes all associations from this map.


GigaSpaces XAP 9.7.2 API

Copyright © GigaSpaces.