java.lang.Object
org.metacosm.framework.perceptions.SenseMemory
- All Implemented Interfaces:
- org.metacosm.framework.persistence.Persistent, java.io.Serializable
- class SenseMemory
- extends java.lang.Object
- implements org.metacosm.framework.persistence.Persistent
The memory of a Sense
A very simple cache algorithm is used.
All memory is cleared every CLEAR_INTERVAL.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLEAR_INTERVAL
private static final long CLEAR_INTERVAL
- The clear interval in milliseconds
- See Also:
- Constant Field Values
descriptions
private java.util.Set descriptions
lastUpdateDate
private long lastUpdateDate
SenseMemory
SenseMemory()
addDescriptions
void addDescriptions(java.util.List descriptions)
- Adds descriptions to the memory.
fadeMemory
void fadeMemory()
getDescriptions
java.util.Set getDescriptions()
- Gets all descriptions in the memory.
load
public void load(java.io.InputStream is)
throws java.io.IOException
- Loads from the stream.
- Specified by:
load in interface org.metacosm.framework.persistence.Persistent
save
public void save(java.io.OutputStream os)
throws java.io.IOException
- Saves on the stream.
- Specified by:
save in interface org.metacosm.framework.persistence.Persistent