FileDocCategorySizeDatePackage
Metadata.javaAPI DocGlassfish v2 API3887Fri May 04 22:35:28 BST 2007com.sun.appserv.ha.spi

Metadata

public class Metadata extends Object
A class for storing meta information

Fields Summary
private long
version
private long
lastAccessTime
private long
maxInactiveInterval
Constructors Summary
public Metadata(long version, long lastAccesstime, long maxInactiveInterval)
Construct a Metadata object

param
version The version of the data. A freshly created state has a version == 0
param
lastAccesstime the last access time of the state. This must be used in conjunction with getMaxInactiveInterval to determine if the state is idle enough to be removed.
param
maxInactiveInterval the maximum time that this state can be idle in the store before it can be removed.

        this.version = version;
        this.lastAccessTime = lastAccesstime;
        this.maxInactiveInterval = maxInactiveInterval;
    
Methods Summary
public longgetLastAccessTime()
Get the last access time of the state. This must be used in conjunction with getMaxInactiveInterval to determine if the state is idle enough to be removed.

return
The time when the state was accessed last
see
getMaxInactiveInterval
see
BackingStore.removeExpired()

        return lastAccessTime;
    
public longgetMaxInactiveInterval()
Get the maximum time that this state can be idle in the store before it can be removed.

return
the maximum idle time. If zero or negative, then the component has no idle timeout limit

        return this.maxInactiveInterval;
    
public longgetVersion()
Get the verion of the state. A freshly created state has a version == 0

return
the version.

        return version;