|
|||||||||
| Home >> All >> com >> opencms >> flex >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.opencms.flex.util
Class CmsLruHashMap.CmsLruCacheObject

java.lang.Objectcom.opencms.flex.util.CmsLruHashMap.CmsLruCacheObject
- All Implemented Interfaces:
- I_CmsFlexLruCacheObject
- Enclosing class:
- CmsLruHashMap
- class CmsLruHashMap.CmsLruCacheObject
- extends java.lang.Object
- implements I_CmsFlexLruCacheObject
- extends java.lang.Object
An object saved under the LRU policy in a CmsLruHashMap.
| Field Summary | |
private I_CmsFlexLruCacheObject |
m_Next
Pointer to the next cache entry in the LRU cache. |
private CmsLruHashMap |
m_ParentHashMap
|
private java.lang.Object |
m_ParentKey
|
private I_CmsFlexLruCacheObject |
m_Previous
Pointer to the previous cache entry in the LRU cache. |
private java.lang.Object |
m_Value
|
| Constructor Summary | |
CmsLruHashMap.CmsLruCacheObject(java.lang.Object theInitialValue,
java.lang.Object theParentKey,
CmsLruHashMap theParentHashMap)
Constuctor. |
|
| Method Summary | |
void |
addToLruCache()
Invoked after an object was added to the cache. |
protected void |
finalize()
Called on an object by the Virtual Machine at most once, at some point after the Object is determined unreachable but before it is destroyed. |
int |
getLruCacheCosts()
Returns the cache costs of this object, as for example it's byte size. |
I_CmsFlexLruCacheObject |
getNextLruObject()
Returns the next object in the double linked list of all cached objects. |
I_CmsFlexLruCacheObject |
getPreviousLruObject()
Returns the previous object in the double linked list of all cached objects. |
java.lang.Object |
getValue()
Returns the value. |
void |
removeFromLruCache()
Invoked after the object was removed to the cache. |
void |
setNextLruObject(I_CmsFlexLruCacheObject theNextObject)
Set the next object in the double linked list of all cached objects. |
void |
setPreviousLruObject(I_CmsFlexLruCacheObject thePreviousObject)
Set the previous object in the double linked list of all cached objects. |
void |
setValue(java.lang.Object value)
Sets the value. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
m_ParentHashMap
private CmsLruHashMap m_ParentHashMap
m_ParentKey
private java.lang.Object m_ParentKey
m_Value
private java.lang.Object m_Value
m_Next
private I_CmsFlexLruCacheObject m_Next
- Pointer to the next cache entry in the LRU cache.
m_Previous
private I_CmsFlexLruCacheObject m_Previous
- Pointer to the previous cache entry in the LRU cache.
| Constructor Detail |
CmsLruHashMap.CmsLruCacheObject
public CmsLruHashMap.CmsLruCacheObject(java.lang.Object theInitialValue, java.lang.Object theParentKey, CmsLruHashMap theParentHashMap)
- Constuctor.
| Method Detail |
finalize
protected void finalize()
throws java.lang.Throwable
- Description copied from class:
java.lang.Object - Called on an object by the Virtual Machine at most once,
at some point after the Object is determined unreachable
but before it is destroyed. You would think that this
means it eventually is called on every Object, but this is
not necessarily the case. If execution terminates
abnormally, garbage collection does not always happen.
Thus you cannot rely on this method to always work.
For finer control over garbage collection, use references
from the
java.lang.refpackage.Virtual Machines are free to not call this method if they can determine that it does nothing important; for example, if your class extends Object and overrides finalize to do simply
super.finalize().finalize() will be called by a java.lang.Thread that has no locks on any Objects, and may be called concurrently. There are no guarantees on the order in which multiple objects are finalized. This means that finalize() is usually unsuited for performing actions that must be thread-safe, and that your implementation must be use defensive programming if it is to always work.
If an Exception is thrown from finalize() during garbage collection, it will be patently ignored and the Object will still be destroyed.
It is allowed, although not typical, for user code to call finalize() directly. User invocation does not affect whether automatic invocation will occur. It is also permitted, although not recommended, for a finalize() method to "revive" an object by making it reachable from normal code again.
Unlike constructors, finalize() does not get called for an object's superclass unless the implementation specifically calls
super.finalize().The default implementation does nothing.
setNextLruObject
public void setNextLruObject(I_CmsFlexLruCacheObject theNextObject)
- Description copied from interface:
I_CmsFlexLruCacheObject - Set the next object in the double linked list of all cached objects.
- Specified by:
setNextLruObjectin interfaceI_CmsFlexLruCacheObject
getNextLruObject
public I_CmsFlexLruCacheObject getNextLruObject()
- Description copied from interface:
I_CmsFlexLruCacheObject - Returns the next object in the double linked list of all cached objects.
- Specified by:
getNextLruObjectin interfaceI_CmsFlexLruCacheObject
setPreviousLruObject
public void setPreviousLruObject(I_CmsFlexLruCacheObject thePreviousObject)
- Description copied from interface:
I_CmsFlexLruCacheObject - Set the previous object in the double linked list of all cached objects.
- Specified by:
setPreviousLruObjectin interfaceI_CmsFlexLruCacheObject
getPreviousLruObject
public I_CmsFlexLruCacheObject getPreviousLruObject()
- Description copied from interface:
I_CmsFlexLruCacheObject - Returns the previous object in the double linked list of all cached objects.
- Specified by:
getPreviousLruObjectin interfaceI_CmsFlexLruCacheObject
addToLruCache
public void addToLruCache()
- Description copied from interface:
I_CmsFlexLruCacheObject - Invoked after an object was added to the cache.
- Specified by:
addToLruCachein interfaceI_CmsFlexLruCacheObject
removeFromLruCache
public void removeFromLruCache()
- Description copied from interface:
I_CmsFlexLruCacheObject - Invoked after the object was removed to the cache.
- Specified by:
removeFromLruCachein interfaceI_CmsFlexLruCacheObject
getLruCacheCosts
public int getLruCacheCosts()
- Description copied from interface:
I_CmsFlexLruCacheObject - Returns the cache costs of this object, as for example it's byte size.
- Specified by:
getLruCacheCostsin interfaceI_CmsFlexLruCacheObject
getValue
public java.lang.Object getValue()
- Returns the value.
setValue
public void setValue(java.lang.Object value)
- Sets the value.
|
|||||||||
| Home >> All >> com >> opencms >> flex >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.opencms.flex.util.CmsLruHashMap.CmsLruCacheObject