Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.metacosm.framework.perceptions
Class SenseMemory  view SenseMemory download SenseMemory.java

java.lang.Object
  extended byorg.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.


Field Summary
private static long CLEAR_INTERVAL
          The clear interval in milliseconds
private  java.util.Set descriptions
           
private  long lastUpdateDate
           
 
Constructor Summary
(package private) SenseMemory()
           
 
Method Summary
(package private)  void addDescriptions(java.util.List descriptions)
          Adds descriptions to the memory.
(package private)  void fadeMemory()
           
(package private)  java.util.Set getDescriptions()
          Gets all descriptions in the memory.
 void load(java.io.InputStream is)
          Loads from the stream.
 void save(java.io.OutputStream os)
          Saves on the stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

SenseMemory

SenseMemory()
Method Detail

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