Class SimpleMetadata

    • Constructor Detail

      • SimpleMetadata

        public SimpleMetadata()
      • SimpleMetadata

        public SimpleMetadata​(long version,
                              long lastAccesstime,
                              long maxInactiveInterval,
                              byte[] state)
        Construct a SimpleMetadata object
        Parameters:
        version - The version of the data. A freshly created state has a version == 0
        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.
        maxInactiveInterval - the maximum time that this state can be idle in the store before it can be removed.
    • Method Detail

      • getVersion

        public long getVersion()
        Get the verion of the state. A freshly created state has a version == 0
        Returns:
        the version.
      • setVersion

        public void setVersion​(long version)
      • getLastAccessTime

        public long getLastAccessTime()
        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.
        Returns:
        The time when the state was accessed last
      • setLastAccessTime

        public void setLastAccessTime​(long lastAccessTime)
      • getMaxInactiveInterval

        public long getMaxInactiveInterval()
        Get the maximum time that this state can be idle in the store before it can be removed.
        Returns:
        the maximum idle time. If zero or negative, then the component has no idle timeout limit
      • setMaxInactiveInterval

        public void setMaxInactiveInterval​(long maxInactiveInterval)
      • getState

        public byte[] getState()
      • setState

        public void setState​(byte[] state)
      • _storeable_getVersion

        public long _storeable_getVersion()
        Description copied from interface: Storeable
        Get the version of this entry. -1 means that this entry has no version
        Specified by:
        _storeable_getVersion in interface Storeable
        Returns:
        The version or null if this entry has no version
      • _storeable_getDirtyStatus

        public boolean[] _storeable_getDirtyStatus()
        Description copied from interface: Storeable
        Providers can cache this
        Specified by:
        _storeable_getDirtyStatus in interface Storeable
        Returns:
        A boolean array each representing the dirty status of the attribute whose name can be found at the same index in the array returned by _getAttributeNames()