de.cesr.lara.components.container.memory
Interface LaraLimitedRetentionMemory<PropertyType extends LaraProperty<PropertyType,?>>

All Superinterfaces:
Iterable<PropertyType>, LaraContainer<PropertyType>, LaraMemory<PropertyType>

public interface LaraLimitedRetentionMemory<PropertyType extends LaraProperty<PropertyType,?>>
extends LaraMemory<PropertyType>

The interface for memory implementations that add temporal retention functionality (temporal decay) to the basic memory component of LARA (see AncientLaraMemory).


Field Summary
static int UNLIMITED_RETENTION_TIME
          Constant to indicate that the retention of the item/items is to be (virtually) unlimited, i.e. the item/items will not be forgotten (removed) unless capacity management demands it.
 
Fields inherited from interface de.cesr.lara.components.container.memory.LaraMemory
UNLIMITED_RETENTION
 
Fields inherited from interface de.cesr.lara.components.container.LaraContainer
UNLIMITED_CAPACITY
 
Method Summary
 int getDefaultRetentionTime()
          Returns the default retention time currently set.
 void memorise(String key, float value, int retentionTime)
          Attempts to add a new item to memory having the specified float value and retention time and identified by the specified key.
 void memorise(String key, int value, int retentionTime)
          Attempts to add a new item to memory having the specified int value and retention time and identified by the specified key.
 void memorise(String key, String value, int retentionTime)
          Attempts to add a new item to memory having the specified (String ) value and retention time and identified by the specified key.
 void setDefaultRetentionTime(int defaultRetentionTime)
          Sets the default retention time.
 
Methods inherited from interface de.cesr.lara.components.container.memory.LaraMemory
addMemoryPropertyObserver, clear, contains, contains, contains, contains, contains, forget, forget, forgetAll, forgetAll, getAllPropertyKeys, getName, getRetentionTime, memorize, memorize, recall, recall, recall, recall, recallAll, recallAll, recallAll, refresh, refresh, refresh, refresh, refresh, removeMemoryPropertyObserver
 
Methods inherited from interface de.cesr.lara.components.container.LaraContainer
getCapacity, getSize, isEmpty, isFull
 
Methods inherited from interface java.lang.Iterable
iterator
 

Field Detail

UNLIMITED_RETENTION_TIME

static final int UNLIMITED_RETENTION_TIME
Constant to indicate that the retention of the item/items is to be (virtually) unlimited, i.e. the item/items will not be forgotten (removed) unless capacity management demands it.

See Also:
Constant Field Values
Method Detail

getDefaultRetentionTime

int getDefaultRetentionTime()
Returns the default retention time currently set. Newly memorised items that have not been assigned a retention time explicitly will be initialised with the default retention time.

Specified by:
getDefaultRetentionTime in interface LaraMemory<PropertyType extends LaraProperty<PropertyType,?>>
Returns:
the current default retention time.

memorise

void memorise(String key,
              float value,
              int retentionTime)
Attempts to add a new item to memory having the specified float value and retention time and identified by the specified key.

Parameters:
key - identifier describing the given value, e.g. on the basis of a user-defined ontology.
value - the value associated with the given key.
retentionTime - the initial time-to-live for this item.

memorise

void memorise(String key,
              int value,
              int retentionTime)
Attempts to add a new item to memory having the specified int value and retention time and identified by the specified key.

Parameters:
key - identifier describing the given value, e.g. on the basis of a user-defined ontology.
value - the value associated with the given key.
retentionTime - the initial time-to-live for this item.

memorise

void memorise(String key,
              String value,
              int retentionTime)
Attempts to add a new item to memory having the specified (String ) value and retention time and identified by the specified key.

Parameters:
key - identifier describing the given value, e.g. on the basis of a user-defined ontology.
value - the value associated with the given key.
retentionTime - the initial time-to-live for this item.

setDefaultRetentionTime

void setDefaultRetentionTime(int defaultRetentionTime)
Sets the default retention time. Newly memorised items that have not been assigned a retention time explicitly will be initialised with the default retention time.

Specified by:
setDefaultRetentionTime in interface LaraMemory<PropertyType extends LaraProperty<PropertyType,?>>
Parameters:
defaultRetentionTime -