Interface IElementAttributes
- All Superinterfaces:
- Cloneable,- Serializable
- All Known Implementing Classes:
- ElementAttributes
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddElementEventHandler(IElementEventHandler eventHandler) Adds a ElementEventHandler.voidaddElementEventHandlers(List<IElementEventHandler> eventHandlers) Sets the eventHandlers of the IElementAttributes objectclone()Clone objectlongGets the createTime attribute of the IAttributes object.Gets the elementEventHandlers.longGets the idleTime attribute of the IAttributes objectbooleanThis turns off expiration if it is true.booleanIs this item laterally distributable.booleanCan this item be sent to the remote cache.booleanCan this item be spooled to disklongGets the LastAccess attribute of the IAttributes object.longSets the maxLife attribute of the IAttributes object.intgetSize()Gets the size attribute of the IAttributes objectlonglongGets the time left to live of the IAttributes object.voidsetIdleTime(long idle) Sets the idleTime attribute of the IAttributes object.voidsetIsEternal(boolean val) Sets the isEternal attribute of the IElementAttributes objectvoidsetIsLateral(boolean val) Sets the isLateral attribute of the IElementAttributes objectvoidsetIsRemote(boolean val) Sets the isRemote attribute of the IElementAttributes object.voidsetIsSpool(boolean val) Sets the isSpool attribute of the IElementAttributes objectvoidSets the LastAccessTime as now of the IElementAttributes objectvoidsetMaxLife(long mls) Sets the maxLife attribute of the IAttributes object.voidsetSize(int size) Size in bytes.voidsetTimeFactorForMilliseconds(long factor) 
- 
Method Details- 
setMaxLifeSets the maxLife attribute of the IAttributes object.- Parameters:
- mls- The new MaxLifeSeconds value
 
- 
getMaxLifelong getMaxLife()Sets the maxLife attribute of the IAttributes object. How many seconds it can live after creation.If this is exceeded the element will not be returned, instead it will be removed. It will be removed on retrieval, or removed actively if the memory shrinker is turned on. - Returns:
- The MaxLifeSeconds value
 
- 
setIdleTimeSets the idleTime attribute of the IAttributes object. This is the maximum time the item can be idle in the cache, that is not accessed.If this is exceeded the element will not be returned, instead it will be removed. It will be removed on retrieval, or removed actively if the memory shrinker is turned on. - Parameters:
- idle- The new idleTime value
 
- 
setSizeSize in bytes. This is not used except in the admin pages. It will be 0 by default and is only updated when the element is serialized.- Parameters:
- size- The new size value
 
- 
getSizeint getSize()Gets the size attribute of the IAttributes object- Returns:
- The size value
 
- 
getCreateTimelong getCreateTime()Gets the createTime attribute of the IAttributes object.This should be the current time in milliseconds returned by the sysutem call when the element is put in the cache. Putting an item in the cache overrides any existing items. - Returns:
- The createTime value
 
- 
getLastAccessTimelong getLastAccessTime()Gets the LastAccess attribute of the IAttributes object.- Returns:
- The LastAccess value.
 
- 
setLastAccessTimeNowvoid setLastAccessTimeNow()Sets the LastAccessTime as now of the IElementAttributes object
- 
getIdleTimelong getIdleTime()Gets the idleTime attribute of the IAttributes object- Returns:
- The idleTime value
 
- 
getTimeToLiveSecondslong getTimeToLiveSeconds()Gets the time left to live of the IAttributes object.This is the (max life + create time) - current time. - Returns:
- The TimeToLiveSeconds value
 
- 
getIsSpoolboolean getIsSpool()Can this item be spooled to diskBy default this is true. - Returns:
- The spoolable value
 
- 
setIsSpoolSets the isSpool attribute of the IElementAttributes objectBy default this is true. - Parameters:
- val- The new isSpool value
 
- 
getIsLateralboolean getIsLateral()Is this item laterally distributable. Can it be sent to auxiliaries of type lateral.By default this is true. - Returns:
- The isLateral value
 
- 
setIsLateralSets the isLateral attribute of the IElementAttributes objectBy default this is true. - Parameters:
- val- The new isLateral value
 
- 
getIsRemoteboolean getIsRemote()Can this item be sent to the remote cache.By default this is true. - Returns:
- The isRemote value
 
- 
setIsRemoteSets the isRemote attribute of the IElementAttributes object.By default this is true. - Parameters:
- val- The new isRemote value
 
- 
getIsEternalboolean getIsEternal()This turns off expiration if it is true.- Returns:
- The IsEternal value
 
- 
setIsEternalSets the isEternal attribute of the IElementAttributes object- Parameters:
- val- The new isEternal value
 
- 
addElementEventHandlerAdds a ElementEventHandler. Handler's can be registered for multiple events. A registered handler will be called at every recognized event.- Parameters:
- eventHandler- The feature to be added to the ElementEventHandler
 
- 
getElementEventHandlersGets the elementEventHandlers.Event handlers are transient. The only events defined are in memory events. All handlers are lost if the item goes to disk. - Returns:
- The elementEventHandlers value, null if there are none
 
- 
addElementEventHandlersSets the eventHandlers of the IElementAttributes object- Parameters:
- eventHandlers- value
 
- 
getTimeFactorForMillisecondslong getTimeFactorForMilliseconds()
- 
setTimeFactorForMilliseconds
- 
cloneClone object
 
-