GigaSpaces XAP 8.0 API

com.sun.jini.collection
Class WeakSoftTable.SoftValue

java.lang.Object
  extended by java.lang.ref.Reference<T>
      extended by java.lang.ref.SoftReference
          extended by com.sun.jini.collection.WeakSoftTable.SoftValue
All Implemented Interfaces:
WeakSoftTable.RemovableReference
Enclosing class:
WeakSoftTable

public static class WeakSoftTable.SoftValue
extends SoftReference
implements WeakSoftTable.RemovableReference

A value that maintains a soft reference to an object.


Field Summary
protected  WeakSoftTable.WeakKey key
          The associated key.
 
Constructor Summary
protected WeakSoftTable.SoftValue(WeakSoftTable.SoftValue softValue, ReferenceQueue queue)
          Creates a copy of the value registered with the queue.
  WeakSoftTable.SoftValue(WeakSoftTable.WeakKey key, Object value)
          Creates a value for the associated key that retains a soft reference to value.
 
Method Summary
 void cleared(Map map)
          Called with the containing map when this instance's reference is cleared, to remove the associated entry from the map.
 WeakSoftTable.RemovableReference copy(ReferenceQueue queue)
          Returns a copy of this instance registered with the specified queue.
 
Methods inherited from class java.lang.ref.SoftReference
get
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, isEnqueued
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected final WeakSoftTable.WeakKey key
The associated key. Used to remove the hash table entry when the value is cleared.

Constructor Detail

WeakSoftTable.SoftValue

public WeakSoftTable.SoftValue(WeakSoftTable.WeakKey key,
                               Object value)
Creates a value for the associated key that retains a soft reference to value.


WeakSoftTable.SoftValue

protected WeakSoftTable.SoftValue(WeakSoftTable.SoftValue softValue,
                                  ReferenceQueue queue)
Creates a copy of the value registered with the queue.

Method Detail

copy

public WeakSoftTable.RemovableReference copy(ReferenceQueue queue)
Description copied from interface: WeakSoftTable.RemovableReference
Returns a copy of this instance registered with the specified queue.

Specified by:
copy in interface WeakSoftTable.RemovableReference
Parameters:
queue - the queue with which this instance should be registered
Returns:
the copy

cleared

public void cleared(Map map)
Description copied from interface: WeakSoftTable.RemovableReference
Called with the containing map when this instance's reference is cleared, to remove the associated entry from the map.

Specified by:
cleared in interface WeakSoftTable.RemovableReference
Parameters:
map - the map from which this newly cleared instance should be removed

GigaSpaces XAP 8.0 API

Copyright © GigaSpaces.