public class Mind
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList> |
codeletGroups |
protected CodeRack |
codeRack |
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList> |
memoryGroups |
protected RawMemory |
rawMemory |
Constructor and Description |
---|
Mind()
Creates the Mind.
|
Modifier and Type | Method and Description |
---|---|
void |
createCodeletGroup(java.lang.String groupName)
Creates a Codelet Group
|
MemoryContainer |
createMemoryContainer(java.lang.String name)
Creates a Memory Container inside the Mind of a given type.
|
void |
createMemoryGroup(java.lang.String groupName)
Creates a Memory Group
|
MemoryObject |
createMemoryObject(java.lang.String name)
Creates a new MemoryObject and adds it to the Raw Memory, using provided
type.
|
MemoryObject |
createMemoryObject(java.lang.String name,
java.lang.Object info)
Creates a new MemoryObject and adds it to the Raw Memory, using provided
info and type.
|
java.util.ArrayList<Codelet> |
getCodeletGroupList(java.lang.String groupName)
Get a list of all Codelets belonging to a group
|
java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList> |
getCodeletGroups()
Returns the full HashMap which for every codelet group Name it is associated a list of codeletGroups
|
int |
getCodeletGroupsNumber()
Returns the number of registered codelet groups
|
CodeRack |
getCodeRack()
Gets the CodeRack.
|
java.util.ArrayList<Memory> |
getMemoryGroupList(java.lang.String groupName)
Get a list of all Memories belonging to a group
|
java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList> |
getMemoryGroups()
Returns the full HashMap which for every memory group Name it is associated a list of codeletGroups
|
int |
getMemoryGroupsNumber()
Returns the number of registered memory groups
|
RawMemory |
getRawMemory()
Gets the RawMemory.
|
Codelet |
insertCodelet(Codelet co)
Inserts the Codelet passed in the Mind's CodeRack.
|
Codelet |
insertCodelet(Codelet co,
java.lang.String groupName)
Inserts the Codelet passed in the Mind's CodeRack.
|
void |
registerCodelet(Codelet co,
java.lang.String groupName)
Register a Codelet within a group
|
void |
registerMemory(Memory m,
java.lang.String groupName)
Register a Memory within a group
|
void |
registerMemory(java.lang.String m,
java.lang.String groupName)
Register a Memory within a group by name.
|
void |
shutDown()
Stops codeletGroups thread.
|
void |
start()
Starts all codeletGroups in coderack.
|
protected CodeRack codeRack
protected RawMemory rawMemory
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList> codeletGroups
protected java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList> memoryGroups
public CodeRack getCodeRack()
public RawMemory getRawMemory()
public void createCodeletGroup(java.lang.String groupName)
groupName
- The Group namepublic void createMemoryGroup(java.lang.String groupName)
groupName
- The Group namepublic java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList> getCodeletGroups()
public java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.ArrayList> getMemoryGroups()
public int getCodeletGroupsNumber()
public int getMemoryGroupsNumber()
public MemoryContainer createMemoryContainer(java.lang.String name)
name
- the type of the Memory Container to be created inside the
Mind.public MemoryObject createMemoryObject(java.lang.String name, java.lang.Object info)
name
- memory object name.info
- memory object info.public MemoryObject createMemoryObject(java.lang.String name)
name
- memory object type.public Codelet insertCodelet(Codelet co)
co
- the Codelet passedpublic Codelet insertCodelet(Codelet co, java.lang.String groupName)
co
- the Codelet to be inserted in the MindgroupName
- the Codelet group namepublic void registerCodelet(Codelet co, java.lang.String groupName)
co
- the CodeletgroupName
- the group namepublic void registerMemory(Memory m, java.lang.String groupName)
m
- the MemorygroupName
- the group namepublic void registerMemory(java.lang.String m, java.lang.String groupName)
m
- the MemorygroupName
- the group namepublic java.util.ArrayList<Codelet> getCodeletGroupList(java.lang.String groupName)
groupName
- the group name to which the Codelets belongpublic java.util.ArrayList<Memory> getMemoryGroupList(java.lang.String groupName)
groupName
- the group name to which the Memory belongpublic void start()
public void shutDown()