org.apache.jcs.engine
Class Attributes

java.lang.Object
  extended byorg.apache.jcs.engine.Attributes
All Implemented Interfaces:
java.lang.Cloneable, IAttributes, java.io.Serializable

public class Attributes
extends java.lang.Object
implements IAttributes, java.io.Serializable, java.lang.Cloneable

Element attribute descriptor class.

Version:
$Id: ILateralCacheTCPListener.java,v 1.2 2002/01/18 22:08:26
See Also:
Serialized Form

Field Summary
 long createTime
          Description of the Field
 long default_ttl
          Description of the Field
 long idle
          Description of the Field
 boolean IS_DISTRIBUTE
          Can this be send over a lateral or remote service.
 boolean IS_ETERNAL
          Is the attribute above the max life law.
 boolean IS_LATERAL
          Can the element be set laterally
 boolean IS_REMOTE
          Description of the Field
 boolean IS_SPOOL
          Can the element be spooled to disk.
 long lastAccess
          Description of the Field
 int size
          Description of the Field
 long ttl
          Description of the Field
 long version
          Description of the Field
 
Constructor Summary
  Attributes()
          Set the create time.
protected Attributes(Attributes attr)
          Constructor for the Attributes object
 
Method Summary
 java.lang.Object clone2()
          Deep clone
 Attributes copy()
          clone
 long getCreateTime()
          Gets the createTime attribute of the Attributes object
 long getIdleTime()
          Gets the idleTime attribute of the Attributes object
 int getSize()
          Gets the size attribute of the Attributes object
 long getTimeToLive()
          Gets the timeToLive attribute of the Attributes object.
 long getVersion()
          Gets the version attribute of the Attributes object
 void setCreateTime()
          Sets the createTime attribute of the Attributes object
 void setIdleTime(long idle)
          Sets the idleTime attribute of the Attributes object
 void setSize(int size)
          Size in bytes.
 void setTimeToLive(long ttl)
          Sets the timeToLive attribute of the Attributes object
 void setVersion(long version)
          Sets the version attribute of the Attributes object
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IS_DISTRIBUTE

public boolean IS_DISTRIBUTE
Can this be send over a lateral or remote service.


IS_LATERAL

public boolean IS_LATERAL
Can the element be set laterally


IS_SPOOL

public boolean IS_SPOOL
Can the element be spooled to disk.


IS_REMOTE

public boolean IS_REMOTE
Description of the Field


IS_ETERNAL

public boolean IS_ETERNAL
Is the attribute above the max life law.


version

public long version
Description of the Field


ttl

public long ttl
Description of the Field


default_ttl

public long default_ttl
Description of the Field


idle

public long idle
Description of the Field


lastAccess

public long lastAccess
Description of the Field


size

public int size
Description of the Field


createTime

public long createTime
Description of the Field

Constructor Detail

Attributes

public Attributes()
Set the create time.


Attributes

protected Attributes(Attributes attr)
Constructor for the Attributes object

Parameters:
attr -
Method Detail

copy

public Attributes copy()
clone

Returns:
Attributes

clone2

public java.lang.Object clone2()
Deep clone

Returns:

setVersion

public void setVersion(long version)
Sets the version attribute of the Attributes object

Specified by:
setVersion in interface IAttributes
Parameters:
version - The new version value

setTimeToLive

public void setTimeToLive(long ttl)
Sets the timeToLive attribute of the Attributes object

Specified by:
setTimeToLive in interface IAttributes
Parameters:
ttl - The new timeToLive value

setIdleTime

public void setIdleTime(long idle)
Sets the idleTime attribute of the Attributes object

Specified by:
setIdleTime in interface IAttributes
Parameters:
idle - The new idleTime value

setSize

public void setSize(int size)
Size in bytes.

Specified by:
setSize in interface IAttributes
Parameters:
size - The new size value

getSize

public int getSize()
Gets the size attribute of the Attributes object

Specified by:
getSize in interface IAttributes
Returns:
The size value

getCreateTime

public long getCreateTime()
Gets the createTime attribute of the Attributes object

Specified by:
getCreateTime in interface IAttributes
Returns:
The createTime value

setCreateTime

public void setCreateTime()
Sets the createTime attribute of the Attributes object


getVersion

public long getVersion()
Gets the version attribute of the Attributes object

Specified by:
getVersion in interface IAttributes
Returns:
The version value

getIdleTime

public long getIdleTime()
Gets the idleTime attribute of the Attributes object

Specified by:
getIdleTime in interface IAttributes
Returns:
The idleTime value

getTimeToLive

public long getTimeToLive()
Gets the timeToLive attribute of the Attributes object. This should be called maxLifeSeconds since it is the number of seconds teh item will be available after creation, not the time from now. Need another method. This one can calculate the time left.

Specified by:
getTimeToLive in interface IAttributes
Returns:
The timeToLive value

toString

public java.lang.String toString()


Copyright © 2002-2007 Apache Software Foundation. All Rights Reserved.