Class CompositeMetadata
- java.lang.Object
-
- org.glassfish.web.ha.session.management.CompositeMetadata
-
- All Implemented Interfaces:
Serializable
,org.glassfish.ha.store.api.Storeable
public final class CompositeMetadata extends Object implements org.glassfish.ha.store.api.Storeable
A class to hold a collection of children SessionAttributeMetadata. This class is used mainly to store a collection of AttributeMetaData that are part of a WebSession. The metadata about the web session itself can be obtained directly from the CompositeMetadata itself, while the metadata of its attributes can be obtained from the individual SessionAttributeMetadata that is part of the collection returned by getEntries().- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CompositeMetadata()
Every Storeable must have a public no arg constructorCompositeMetadata(long version, long lastAccessTime, long maxInactiveInterval, Collection<SessionAttributeMetadata> entries, byte[] state, String stringExtraParam)
Construct a CompositeMetadata object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String[]
_storeable_getAttributeNames()
boolean[]
_storeable_getDirtyStatus()
long
_storeable_getLastAccessTime()
long
_storeable_getMaxIdleTime()
long
_storeable_getVersion()
void
_storeable_readState(InputStream is)
void
_storeable_setLastAccessTime(long lastAccessTime)
void
_storeable_setMaxIdleTime(long maxInactiveInterval)
void
_storeable_setVersion(long version)
void
_storeable_writeState(OutputStream os)
Collection<SessionAttributeMetadata>
getEntries()
Returns a collection of Metadata (or its subclass).byte[]
getState()
String
getStringExtraParam()
long
getVersion()
void
setState(byte[] state)
void
setStringExtraParam(String stringExtraParam)
String
toString()
-
-
-
Constructor Detail
-
CompositeMetadata
public CompositeMetadata()
Every Storeable must have a public no arg constructor
-
CompositeMetadata
public CompositeMetadata(long version, long lastAccessTime, long maxInactiveInterval, Collection<SessionAttributeMetadata> entries, byte[] state, String stringExtraParam)
Construct a CompositeMetadata object- Parameters:
version
- The version of the data. A freshly created state has a version == 0lastAccessTime
- 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.maxInactiveInterval
- the maximum time that this state can be idle in the store before it can be removed.entries
- the SessionAttributeMetadata that are part of this Metadata
-
-
Method Detail
-
getState
public byte[] getState()
-
setState
public void setState(byte[] state)
-
getStringExtraParam
public String getStringExtraParam()
-
setStringExtraParam
public void setStringExtraParam(String stringExtraParam)
-
getEntries
public Collection<SessionAttributeMetadata> getEntries()
Returns a collection of Metadata (or its subclass). Note that though it is possible to have a compositeMetadata itself as part of this collection, typically they contain only AttributeMetaData- Returns:
- a collection of SessionAttributeMetadata
-
getVersion
public long getVersion()
-
_storeable_getVersion
public long _storeable_getVersion()
- Specified by:
_storeable_getVersion
in interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_setVersion
public void _storeable_setVersion(long version)
- Specified by:
_storeable_setVersion
in interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_getLastAccessTime
public long _storeable_getLastAccessTime()
- Specified by:
_storeable_getLastAccessTime
in interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_setLastAccessTime
public void _storeable_setLastAccessTime(long lastAccessTime)
- Specified by:
_storeable_setLastAccessTime
in interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_getMaxIdleTime
public long _storeable_getMaxIdleTime()
- Specified by:
_storeable_getMaxIdleTime
in interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_setMaxIdleTime
public void _storeable_setMaxIdleTime(long maxInactiveInterval)
- Specified by:
_storeable_setMaxIdleTime
in interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_getAttributeNames
public String[] _storeable_getAttributeNames()
- Specified by:
_storeable_getAttributeNames
in interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_getDirtyStatus
public boolean[] _storeable_getDirtyStatus()
- Specified by:
_storeable_getDirtyStatus
in interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_writeState
public void _storeable_writeState(OutputStream os) throws IOException
- Specified by:
_storeable_writeState
in interfaceorg.glassfish.ha.store.api.Storeable
- Throws:
IOException
-
_storeable_readState
public void _storeable_readState(InputStream is) throws IOException
- Specified by:
_storeable_readState
in interfaceorg.glassfish.ha.store.api.Storeable
- Throws:
IOException
-
-