|
|||||||||
| Home >> All >> com >> opensymphony >> oscache >> base >> [ algorithm overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opensymphony.oscache.base.algorithm
Class AbstractConcurrentReadCache.Entry

java.lang.Objectcom.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.Entry
- All Implemented Interfaces:
- java.util.Map.Entry
- Enclosing class:
- AbstractConcurrentReadCache
- protected static class AbstractConcurrentReadCache.Entry
- extends java.lang.Object
- implements java.util.Map.Entry
- extends java.lang.Object
AbstractConcurrentReadCache collision list entry.
| Field Summary | |
protected int |
hash
|
protected java.lang.Object |
key
|
protected AbstractConcurrentReadCache.Entry |
next
|
protected java.lang.Object |
value
|
| Constructor Summary | |
(package private) |
AbstractConcurrentReadCache.Entry(int hash,
java.lang.Object key,
java.lang.Object value,
AbstractConcurrentReadCache.Entry next)
|
| Method Summary | |
protected java.lang.Object |
clone()
This method may be called to create a new copy of the Object. |
boolean |
equals(java.lang.Object o)
Compares the specified object with this entry. |
java.lang.Object |
getKey()
Get the key corresponding to this entry. |
java.lang.Object |
getValue()
Get the value. |
int |
hashCode()
Returns the hash code of the entry. |
java.lang.Object |
setValue(java.lang.Object value)
Set the value of this entry. |
java.lang.String |
toString()
Convert this Object to a human-readable String. |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
next
protected final AbstractConcurrentReadCache.Entry next
key
protected final java.lang.Object key
hash
protected final int hash
value
protected volatile java.lang.Object value
| Constructor Detail |
AbstractConcurrentReadCache.Entry
AbstractConcurrentReadCache.Entry(int hash,
java.lang.Object key,
java.lang.Object value,
AbstractConcurrentReadCache.Entry next)
| Method Detail |
getKey
public java.lang.Object getKey()
- Description copied from interface:
java.util.Map.Entry - Get the key corresponding to this entry.
- Specified by:
getKeyin interfacejava.util.Map.Entry
setValue
public java.lang.Object setValue(java.lang.Object value)
- Set the value of this entry.
Note: In an entrySet or
entrySet.iterator), unless the set or iterator is used under
synchronization of the table as a whole (or you can otherwise
guarantee lack of concurrent modification), setValue
is not strictly guaranteed to actually replace the value field
obtained via the get operation of the underlying hash
table in multithreaded applications. If iterator-wide
synchronization is not used, and any other concurrent
put or remove operations occur, sometimes
even to other entries, then this change is not
guaranteed to be reflected in the hash table. (It might, or it
might not. There are no assurances either way.)
- Specified by:
setValuein interfacejava.util.Map.Entry
getValue
public java.lang.Object getValue()
- Get the value.
Note: In an entrySet or entrySet.iterator,
unless the set or iterator is used under synchronization of the
table as a whole (or you can otherwise guarantee lack of
concurrent modification), getValue might
return null, reflecting the fact that the entry has been
concurrently removed. However, there are no assurances that
concurrent removals will be reflected using this method.
- Specified by:
getValuein interfacejava.util.Map.Entry
equals
public boolean equals(java.lang.Object o)
- Description copied from interface:
java.util.Map.Entry - Compares the specified object with this entry. Returns true only if
the object is a mapping of identical key and value. In other words,
this must be:
(o instanceof Map.Entry) && (getKey() == null ? ((Map.Entry) o).getKey() == null : getKey().equals(((Map.Entry) o).getKey())) && (getValue() == null ? ((Map.Entry) o).getValue() == null : getValue().equals(((Map.Entry) o).getValue()))- Specified by:
equalsin interfacejava.util.Map.Entry
hashCode
public int hashCode()
- Description copied from interface:
java.util.Map.Entry - Returns the hash code of the entry. This is defined as the
exclusive-or of the hashcodes of the key and value (using 0 for
null). In other words, this must be:(getKey() == null ? 0 : getKey().hashCode()) ^ (getValue() == null ? 0 : getValue().hashCode())
- Specified by:
hashCodein interfacejava.util.Map.Entry
toString
public java.lang.String toString()
- Description copied from class:
java.lang.Object - Convert this Object to a human-readable String.
There are no limits placed on how long this String
should be or what it should contain. We suggest you
make it as intuitive as possible to be able to place
it into System.out.println() 55
and such.
It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.
This method will be called when performing string concatenation with this object. If the result is
null, string concatenation will instead use"null".The default implementation returns
getClass().getName() + "@" + Integer.toHexString(hashCode()).
clone
protected java.lang.Object clone()
- Description copied from class:
java.lang.Object - This method may be called to create a new copy of the
Object. The typical behavior is as follows:
o == o.clone()is falseo.getClass() == o.clone().getClass()is trueo.equals(o)is true
However, these are not strict requirements, and may be violated if necessary. Of the three requirements, the last is the most commonly violated, particularly if the subclass does not override Object.equals(Object)>
Object.equals(Object)55 .If the Object you call clone() on does not implement java.lang.Cloneable (which is a placeholder interface), then a CloneNotSupportedException is thrown. Notice that Object does not implement Cloneable; this method exists as a convenience for subclasses that do.
Object's implementation of clone allocates space for the new Object using the correct class, without calling any constructors, and then fills in all of the new field values with the old field values. Thus, it is a shallow copy. However, subclasses are permitted to make a deep copy.
All array types implement Cloneable, and override this method as follows (it should never fail):
public Object clone() { try { super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError(e.getMessage()); } }
|
|||||||||
| Home >> All >> com >> opensymphony >> oscache >> base >> [ algorithm overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.opensymphony.oscache.base.algorithm.AbstractConcurrentReadCache.Entry