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()StringgetStringExtraParam()longgetVersion()voidsetState(byte[] state)voidsetStringExtraParam(String stringExtraParam)StringtoString()
-
-
-
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_getVersionin interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_setVersion
public void _storeable_setVersion(long version)
- Specified by:
_storeable_setVersionin interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_getLastAccessTime
public long _storeable_getLastAccessTime()
- Specified by:
_storeable_getLastAccessTimein interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_setLastAccessTime
public void _storeable_setLastAccessTime(long lastAccessTime)
- Specified by:
_storeable_setLastAccessTimein interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_getMaxIdleTime
public long _storeable_getMaxIdleTime()
- Specified by:
_storeable_getMaxIdleTimein interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_setMaxIdleTime
public void _storeable_setMaxIdleTime(long maxInactiveInterval)
- Specified by:
_storeable_setMaxIdleTimein interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_getAttributeNames
public String[] _storeable_getAttributeNames()
- Specified by:
_storeable_getAttributeNamesin interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_getDirtyStatus
public boolean[] _storeable_getDirtyStatus()
- Specified by:
_storeable_getDirtyStatusin interfaceorg.glassfish.ha.store.api.Storeable
-
_storeable_writeState
public void _storeable_writeState(OutputStream os) throws IOException
- Specified by:
_storeable_writeStatein interfaceorg.glassfish.ha.store.api.Storeable- Throws:
IOException
-
_storeable_readState
public void _storeable_readState(InputStream is) throws IOException
- Specified by:
_storeable_readStatein interfaceorg.glassfish.ha.store.api.Storeable- Throws:
IOException
-
-