|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Attributes
This class defines the attributes an object in the cache can have.
Field Summary | |
---|---|
static long |
DISTRIBUTE
Deprecated. Indicates the object is distributed, updates and invalidations are distributed to other processes. |
static long |
GROUP_TTL_DESTROY
Deprecated. Indicates the group object should be destroyed when the associated time to live expires. |
static int |
INVALIDATE_EVENT
Deprecated. Event wich is fired when invalidation of an cacheobject is fired. |
static long |
NOFLUSH
Deprecated. Indicates to not flush the object from the cache if the object is distributed and the cache is isolated from other caches. |
static long |
ORIGINAL
Deprecated. Indicates the object was created in the cache and can't be recreated if removed from the cache. |
static long |
REPLY
Deprecated. Indicates a reply should be sent from the remote caches if this object is updated or invalidated. |
static long |
SPOOL
Deprecated. Indicates the object shoulod be spooled to disk when the object is being removed from the memory cache because of space limitations. |
static long |
SYNCHRONIZE
Deprecated. Indicates that the updates to this object should be synchronized. |
Method Summary | |
---|---|
void |
applyAttributes(Attributes attributes)
Deprecated. |
long |
getCreateTime()
Deprecated. returns the time the object was loaded into the cache. |
long |
getDefaultTimeToLive()
Deprecated. |
long |
getIdleTime()
Deprecated. returns the current value for the idle time interval. |
CacheEventListener |
getListener()
Deprecated. Gets the CacheEventListener. |
CacheLoader |
getLoader()
Deprecated. returns the CacheLoader attribute. |
int |
getSize()
Deprecated. returns the size of the object. |
long |
getTimeToLive()
Deprecated. returns the current value for the time to live interval. |
long |
getVersion()
Deprecated. returns the current value of version. |
boolean |
isSet(long theFlags)
Deprecated. Checks wether the flags are set or not. |
void |
reset()
Deprecated. resets the Attributes to its default values. |
void |
setCreateTime(long aCreateTime)
Deprecated. Sets the createTime. |
void |
setDefaultTimeToLive(long ttl)
Deprecated. Will set the maximum time the associated cache object will stay in the cache before it is invalidated. |
void |
setFlags(long theFlags)
Deprecated. Is used to specify wich attributes should be set in the attributes object. |
void |
setIdleTime(long idle)
Deprecated. sets the maximum time the associated cache object will remain in the cache without being referenced before it is invalidated. |
void |
setListener(int event,
CacheEventListener aListener)
Deprecated. Register an event listener object to be executed when the specified event occurs with relationship to the associated object. |
void |
setLoader(CacheLoader aLoader)
Deprecated. Will associate a loader object with this object. |
void |
setSize(int aSize)
Deprecated. Is used to specify the size in bytes of the object being cached. |
void |
setTimeToLive(long ttl)
Deprecated. Will set the maximum time the associated cache object will stay in the cache before it is invalidated. |
void |
setVersion(long aVersion)
Deprecated. Sets the version attribute. |
long |
timeToSeconds(int days,
int hours,
int minutes,
int seconds)
Deprecated. Will convert the time specified into seconds. |
Field Detail |
---|
static final int INVALIDATE_EVENT
static final long DISTRIBUTE
static final long NOFLUSH
static final long REPLY
static final long SYNCHRONIZE
static final long SPOOL
static final long GROUP_TTL_DESTROY
static final long ORIGINAL
Method Detail |
---|
void setFlags(long theFlags)
Attributes
class.
theFlags
- The attributes to set. the attributes may be OR-ed
together. I.e. Attributes.DISTRIBUTE | Attributes.SYNCHRONIZE
Invalid flags are silently ignored. To reset all flags you use
0 as a parameter. I.e. setFlags(0)void setLoader(CacheLoader aLoader)
aLoader
- The loader to set. This parameter can be null.void setVersion(long aVersion)
aVersion
- the version number to set.void setTimeToLive(long ttl) throws InvalidArgumentException
CacheLoader
object or put by the
CacheAccess#replace(Object, Object)
) or when the time to live
attribute is set by the CacheLoader.setAttributes(Object,
Attributes)
method.
ttl
- the time to live in seconds. The timeToSeconds(int,
int, int, int)
can be used to convert days, hours, minutes to
seconds.
InvalidArgumentException
- if a negative value for ttl is supplied.void setDefaultTimeToLive(long ttl) throws InvalidArgumentException
CacheLoader
objector put by the CacheAccess#replace(Object, Object)
) or when the time to live attribute
is set by the CacheLoader.setAttributes(Object,Attributes)
method.
ttl
- the time to live in seconds. The timeToSeconds(int,
int, int, int)
can be used to convert days, hours, minutes to
secounds.
InvalidArgumentException
- if a negative value for ttl is supplied.long getDefaultTimeToLive()
void setIdleTime(long idle) throws InvalidArgumentException
idle
- is in seconds. The timeToSeconds(int, int, int,int)
can be used to convert days, hours, minutes to secounds.
InvalidArgumentException
- if a negative value for idle is
supplied.void setListener(int event, CacheEventListener aListener)
event
- The event to listen for.aListener
- the listener to fire when the event occurs.void setSize(int aSize)
aSize
- the size to be set. if this parameter is smaller than zero,
this method silently returns.int getSize()
setSize(int)
method, or in the case of StreamAccess objects, the size
is calculated by the cache.
boolean isSet(long theFlags)
theFlags
- the flags to be checked. may be OR-ed together, for wich
this method will return true only if all flags are set.
long getCreateTime()
CacheLoader getLoader()
CacheLoader
attribute.
CacheLoader
attribute.long getVersion()
long getIdleTime()
long getTimeToLive()
void reset()
void setCreateTime(long aCreateTime)
aCreateTime
- The createTime to setlong timeToSeconds(int days, int hours, int minutes, int seconds) throws InvalidArgumentException
days
- number of days.hours
- number of hours.minutes
- number of minutes.seconds
- number of seconds.
InvalidArgumentException
- if any of the parameters are negative
values.CacheEventListener getListener()
void applyAttributes(Attributes attributes)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |