|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.jini.collection.WeakSoftTable
public final class WeakSoftTable
A table that maps a key containing a weak reference to one or more values containing soft references. The weakly-referenced object in a key are compared for identity using ==. Entries are removed when either weak references in keys or soft references in values are cleared. Callers must insure that instances of this class are not accessed concurrently while they are being modified.
Nested Class Summary | |
---|---|
static interface |
WeakSoftTable.RemovableReference
Implemented by classes to permit copying instances into reference queues when they are added to the table and to remove them from the table when the references are cleared. |
static class |
WeakSoftTable.SoftValue
A value that maintains a soft reference to an object. |
static class |
WeakSoftTable.WeakKey
A key that maintains a weak reference to an object which should be compared by object identity. |
Constructor Summary | |
---|---|
WeakSoftTable()
Creates an instance of this class. |
Method Summary | |
---|---|
void |
add(WeakSoftTable.WeakKey key,
WeakSoftTable.SoftValue value)
Associates an additional value with the specified key. |
WeakSoftTable.SoftValue |
get(WeakSoftTable.WeakKey key,
int index)
Returns the value associated with the specified key and index, or null if not found. |
WeakSoftTable.SoftValue |
remove(WeakSoftTable.WeakKey key,
int index)
Removes and returns the index'th value associated with the specified key. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WeakSoftTable()
Method Detail |
---|
public WeakSoftTable.SoftValue get(WeakSoftTable.WeakKey key, int index)
public void add(WeakSoftTable.WeakKey key, WeakSoftTable.SoftValue value)
public WeakSoftTable.SoftValue remove(WeakSoftTable.WeakKey key, int index)
public String toString()
toString
in class Object
|
GigaSpaces XAP 9.7.2 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |