|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.CacheElement
public class CacheElement
This class implements a structure to store elements into the cache table. This structure wraps to kinds of objects. On one hand it contains a Vector to store the objects to get and put into the cache table, for example operations, and on the other hand it contains a linked list containing a long corresponding to the current time when an object is inserted. When an object is requested for an adding or removing operation, the target cached object will be the last object of the vector, and its corresponding element of the linked list will be the first element of the structure.
Field Summary | |
---|---|
protected Vector |
cachedObjects
|
protected long |
newestTime
|
protected LinkedList |
objectTimestamp
|
Constructor Summary | |
---|---|
CacheElement()
CacheElement default constructor. |
Method Summary | |
---|---|
void |
addElement(Cacheable c)
Adds an element into the structure. |
Cacheable |
getCacheable()
Returns the last element of the cacheObjects Vector. |
Vector |
getCachedObjects()
Returns the cachedObjects. |
long |
getNewestTime()
Returns the time corresponding to the newest element stored in the list |
LinkedList |
getObjectTimestamp()
Returns the objectTimestamp. |
long |
getOldestTime()
Returns the time corresponding to the oldest element stored in the list |
int |
getSize()
Returns the number of objects contained in the cacheObjects Vector. |
void |
removeOldest()
Removes the oldest element of the structure. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Vector cachedObjects
protected LinkedList objectTimestamp
protected long newestTime
Constructor Detail |
---|
public CacheElement()
Method Detail |
---|
public long getOldestTime()
public long getNewestTime()
public void removeOldest()
public void addElement(Cacheable c)
c
- Cacheable Cacheable object to append.public int getSize()
public Cacheable getCacheable()
public Vector getCachedObjects()
public LinkedList getObjectTimestamp()
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |