public interface IElementAttributes extends Serializable, Cloneable
Modifier and Type | Method and Description |
---|---|
void |
addElementEventHandler(IElementEventHandler eventHandler)
Adds a ElementEventHandler.
|
void |
addElementEventHandlers(List<IElementEventHandler> eventHandlers)
Sets the eventHandlers of the IElementAttributes object
|
IElementAttributes |
clone()
Clone object
|
long |
getCreateTime()
Gets the createTime attribute of the IAttributes object.
|
ArrayList<IElementEventHandler> |
getElementEventHandlers()
Gets the elementEventHandlers.
|
long |
getIdleTime()
Gets the idleTime attribute of the IAttributes object
|
boolean |
getIsEternal()
This turns off expiration if it is true.
|
boolean |
getIsLateral()
Is this item laterally distributable.
|
boolean |
getIsRemote()
Can this item be sent to the remote cache.
|
boolean |
getIsSpool()
Can this item be spooled to disk
By default this is true.
|
long |
getLastAccessTime()
Gets the LastAccess attribute of the IAttributes object.
|
long |
getMaxLife()
Sets the maxLife attribute of the IAttributes object.
|
int |
getSize()
Gets the size attribute of the IAttributes object
|
long |
getTimeFactorForMilliseconds() |
long |
getTimeToLiveSeconds()
Gets the time left to live of the IAttributes object.
|
void |
setIdleTime(long idle)
Sets the idleTime attribute of the IAttributes object.
|
void |
setIsEternal(boolean val)
Sets the isEternal attribute of the IElementAttributes object
|
void |
setIsLateral(boolean val)
Sets the isLateral attribute of the IElementAttributes object
By default this is true.
|
void |
setIsRemote(boolean val)
Sets the isRemote attribute of the IElementAttributes object.
|
void |
setIsSpool(boolean val)
Sets the isSpool attribute of the IElementAttributes object
By default this is true.
|
void |
setLastAccessTimeNow()
Sets the LastAccessTime as now of the IElementAttributes object
|
void |
setMaxLife(long mls)
Sets the maxLife attribute of the IAttributes object.
|
void |
setSize(int size)
Size in bytes.
|
void |
setTimeFactorForMilliseconds(long factor) |
void setMaxLife(long mls)
mls
- The new MaxLifeSeconds valuelong getMaxLife()
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.
void setIdleTime(long idle)
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.
idle
- The new idleTime valuevoid setSize(int size)
size
- The new size valueint getSize()
long getCreateTime()
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.
long getLastAccessTime()
void setLastAccessTimeNow()
long getIdleTime()
long getTimeToLiveSeconds()
This is the (max life + create time) - current time.
boolean getIsSpool()
By default this is true.
void setIsSpool(boolean val)
By default this is true.
val
- The new isSpool valueboolean getIsLateral()
By default this is true.
void setIsLateral(boolean val)
By default this is true.
val
- The new isLateral valueboolean getIsRemote()
By default this is true.
void setIsRemote(boolean val)
By default this is true.
val
- The new isRemote valueboolean getIsEternal()
void setIsEternal(boolean val)
val
- The new isEternal valuevoid addElementEventHandler(IElementEventHandler eventHandler)
eventHandler
- The feature to be added to the ElementEventHandlerArrayList<IElementEventHandler> getElementEventHandlers()
Event handlers are transient. The only events defined are in memory events. All handlers are lost if the item goes to disk.
void addElementEventHandlers(List<IElementEventHandler> eventHandlers)
eventHandlers
- valuelong getTimeFactorForMilliseconds()
void setTimeFactorForMilliseconds(long factor)
IElementAttributes clone()
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.