com.isti.util
Class IstiTimeObjectCache.BasicTimeObjectEntry

java.lang.Object
  extended bycom.isti.util.IstiTimeObjectCache.BasicTimeObjectEntry
All Implemented Interfaces:
IstiTimeObjectCache.TimeObjectEntry
Direct Known Subclasses:
IstiMessageObjectCache.BasicMessageObjectEntry
Enclosing class:
IstiTimeObjectCache

public static class IstiTimeObjectCache.BasicTimeObjectEntry
extends java.lang.Object
implements IstiTimeObjectCache.TimeObjectEntry

Basic time object entry.


Field Summary
protected  java.lang.Object dataObj
           
protected  int dataSize
           
protected  java.lang.String keyStr
           
protected  long timeGenerated
           
 
Constructor Summary
protected IstiTimeObjectCache.BasicTimeObjectEntry()
          No-argument constructor for subclasses.
  IstiTimeObjectCache.BasicTimeObjectEntry(long timeGenerated, java.lang.Object dataObj, java.lang.String keyStr)
          Creates a message object cache entry.
 
Method Summary
 java.lang.Object getDataObj()
          Returns the data object.
 int getDataSize()
          Returns the data size for the entry object.
 java.lang.String getKeyStr()
          Returns the key string.
 long getTimeGenerated()
          Returns the time the object was generated.
 void setDataSize(int val)
          Sets the data size for the entry object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeGenerated

protected long timeGenerated

dataObj

protected java.lang.Object dataObj

keyStr

protected java.lang.String keyStr

dataSize

protected int dataSize
Constructor Detail

IstiTimeObjectCache.BasicTimeObjectEntry

public IstiTimeObjectCache.BasicTimeObjectEntry(long timeGenerated,
                                                java.lang.Object dataObj,
                                                java.lang.String keyStr)
Creates a message object cache entry.

Parameters:
timeGenerated - the time the message was generated.
dataObj - data object.
keyStr - key string (to be used as a lookup key into the cache).

IstiTimeObjectCache.BasicTimeObjectEntry

protected IstiTimeObjectCache.BasicTimeObjectEntry()
No-argument constructor for subclasses.

Method Detail

getTimeGenerated

public long getTimeGenerated()
Returns the time the object was generated.

Specified by:
getTimeGenerated in interface IstiTimeObjectCache.TimeObjectEntry
Returns:
the time the object was generated.

getDataObj

public java.lang.Object getDataObj()
Returns the data object.

Specified by:
getDataObj in interface IstiTimeObjectCache.TimeObjectEntry
Returns:
the data object.

getKeyStr

public java.lang.String getKeyStr()
Returns the key string.

Specified by:
getKeyStr in interface IstiTimeObjectCache.TimeObjectEntry
Returns:
the key string.

setDataSize

public void setDataSize(int val)
Sets the data size for the entry object. If a data size is entered for each cache object then a total-data size limit can be enforced by the cache. The object's data size should be setup before the object is added to the cache.

Parameters:
val - the data size value to use.

getDataSize

public int getDataSize()
Returns the data size for the entry object.

Specified by:
getDataSize in interface IstiTimeObjectCache.TimeObjectEntry
Returns:
The data size for the entry object.