|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pandora.knowledge.BasicMemory
public class BasicMemory
Defines a set of networks that make up a knowledge base. Defines long term, short term and flash networks. Basic implementation to allow subclasses to avoid defining some of the basic stuff, Note this basic implementation is not persistent.
Constructor Summary | |
---|---|
BasicMemory()
|
Method Summary | |
---|---|
void |
abort()
Reset the short term and active memories. |
Vertex |
addActiveMemory(Vertex vertex)
Add the sensory data to the active memory. |
void |
addListener(MemoryEventListener listener)
Add the memory listener. |
void |
createMemory(java.lang.String database)
Create a memory database. |
void |
deleteMemory()
Delete all content from the database. |
void |
destroyMemory(java.lang.String database)
Destroy the database. |
java.util.Queue<Vertex> |
getActiveMemory()
Active memory represents the last sensory state. |
java.util.List<MemoryEventListener> |
getListeners()
|
Network |
getLongTermMemory()
Represents the persisted memory (or cache there of). |
java.lang.String |
getMemoryName()
Return the current connected database name. |
Pandora |
getPandora()
Return Pandora. |
Network |
getShortTermMemory()
Represents a non-committed transactional memory. |
void |
importMemory(java.lang.String location)
Allow import of another memory location. |
void |
initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
Initialize any configurable settings from the properties. |
Network |
newMemory()
Return an isolated transactional memory. |
void |
restore()
This implementation does not support persistence. |
void |
restore(java.lang.String database)
This implementation does not support persistence. |
void |
save()
Merge the short term memory into the long term and clears the short term. |
void |
setActiveMemory(java.util.Queue<Vertex> activeMemory)
|
void |
setLongTermMemory(Network longTermMemory)
|
void |
setPandora(Pandora pandora)
Set Pandora. |
void |
setShortTermMemory(Network shortTermMemory)
|
void |
shutdown()
Shutdown the memory. |
void |
switchMemory(java.lang.String location)
Allow switching to another memory location. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BasicMemory()
Method Detail |
---|
public java.lang.String getMemoryName()
getMemoryName
in interface Memory
public Pandora getPandora()
getPandora
in interface Memory
public void setPandora(Pandora pandora)
setPandora
in interface Memory
public void initialize(java.util.Map<java.lang.String,java.lang.Object> properties)
initialize
in interface Memory
public java.util.Queue<Vertex> getActiveMemory()
getActiveMemory
in interface Memory
public Vertex addActiveMemory(Vertex vertex)
addActiveMemory
in interface Memory
public Network getShortTermMemory()
getShortTermMemory
in interface Memory
public Network newMemory()
newMemory
in interface Memory
public Network getLongTermMemory()
getLongTermMemory
in interface Memory
public void setActiveMemory(java.util.Queue<Vertex> activeMemory)
public void setShortTermMemory(Network shortTermMemory)
public void setLongTermMemory(Network longTermMemory)
public void save()
save
in interface Memory
public void restore()
restore
in interface Memory
public void restore(java.lang.String database)
restore
in interface Memory
public void createMemory(java.lang.String database)
createMemory
in interface Memory
public void destroyMemory(java.lang.String database)
destroyMemory
in interface Memory
public void deleteMemory()
deleteMemory
in interface Memory
public void importMemory(java.lang.String location)
importMemory
in interface Memory
public void switchMemory(java.lang.String location)
switchMemory
in interface Memory
public void shutdown()
shutdown
in interface Memory
public void abort()
abort
in interface Memory
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.List<MemoryEventListener> getListeners()
public void addListener(MemoryEventListener listener)
addListener
in interface Memory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |