Package adams.flow.rest.dex.backend
Class InMemory.DataContainer
- java.lang.Object
-
- adams.flow.rest.dex.backend.InMemory.DataContainer
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- InMemory
public static class InMemory.DataContainer extends Object implements Serializable
Wraps the actual data item with the expiry timestamp.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DataContainer(byte[] data, Date expiry)
Initializes the container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getData()
Returns the stored data.Date
getExpiry()
Returns the expiry timestamp.boolean
hasExpired()
Returns whether the data item has expired and need to be removed.
-
-
-
Field Detail
-
m_Data
protected byte[] m_Data
the data item.
-
m_Expiry
protected Date m_Expiry
the expiry timestamp.
-
-
Constructor Detail
-
DataContainer
public DataContainer(byte[] data, Date expiry)
Initializes the container.- Parameters:
data
- the data to wrapexpiry
- the expiry timestamp
-
-
Method Detail
-
getData
public byte[] getData()
Returns the stored data.- Returns:
- the data
-
getExpiry
public Date getExpiry()
Returns the expiry timestamp.- Returns:
- the expiry
-
hasExpired
public boolean hasExpired()
Returns whether the data item has expired and need to be removed.- Returns:
- true if expired
-
-