|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uk.ac.leeds.ccg.andyt.projects.genesis.core.GENESIS_AgentCollection
public abstract class GENESIS_AgentCollection
Each Agent has a reference to at least one AgentCollection. This class contains methods for creating and deleting the file store/cache. Contains methods and collections for managing access to Agents with this store.
Field Summary | |
---|---|
protected java.util.HashMap<java.lang.Long,GENESIS_Agent> |
_Agent_ID_Agent_HashMap
keys are long _AgentID, values are Agents. |
protected long |
_AgentCollection_ID
|
protected java.io.File |
_Directory
The File which is used to swap data. |
protected GENESIS_AgentCollectionManager |
_GENESIS_AgentCollectionManager
|
GENESIS_Environment |
_GENESIS_Environment
|
protected java.lang.String |
_Type
For recording the type (getClass().getName())of Agents _AgentID_Agent_HashMap contains. |
Constructor Summary | |
---|---|
GENESIS_AgentCollection()
|
Method Summary | |
---|---|
java.util.HashMap<java.lang.Long,GENESIS_Agent> |
get_Agent_ID_Agent_HashMap()
|
java.io.File |
get_AgentCollectionManager_Directory()
|
GENESIS_AgentCollectionManager |
get_AgentCollectionManager()
|
protected java.io.File |
get_File()
|
protected java.lang.String |
get_Type()
|
long |
getAgentCollection_ID()
|
abstract java.io.File |
getDirectory()
|
java.lang.Long |
getMaxAgentID()
This would be a lot easier if the data were stored in a TreeMap rather than a HashMap! |
java.lang.Long |
getMaxAgentID(java.lang.Long minAgentID)
|
java.lang.Long |
getMinAgentID()
|
java.util.HashSet |
getPossibleAgentIDs_HashSet()
|
protected void |
init_AgentID_Agent_HashMap()
|
boolean |
isInMemory()
|
boolean |
remove(java.lang.Long a_AgentID)
_Agent_ID_Agent_HashMap.remove(a_AgentID);
if (_Agent_ID_Agent_HashMap.isEmpty()){
return true;
} else {
return false;
}
|
protected void |
swapToFileAgent(java.lang.Long a_Agent_ID)
|
protected void |
swapToFileAgentExcept(java.lang.Long a_Agent_ID)
|
protected void |
swapToFileAgents()
|
protected void |
swapToFileAgentsExcept(java.lang.Long a_Agent_ID)
|
protected void |
write()
|
abstract void |
write(boolean handleOutOfMemoryError)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public transient GENESIS_Environment _GENESIS_Environment
protected java.io.File _Directory
protected long _AgentCollection_ID
protected transient GENESIS_AgentCollectionManager _GENESIS_AgentCollectionManager
protected java.lang.String _Type
protected java.util.HashMap<java.lang.Long,GENESIS_Agent> _Agent_ID_Agent_HashMap
Constructor Detail |
---|
public GENESIS_AgentCollection()
Method Detail |
---|
public java.util.HashMap<java.lang.Long,GENESIS_Agent> get_Agent_ID_Agent_HashMap()
public boolean isInMemory()
public java.io.File get_AgentCollectionManager_Directory()
public GENESIS_AgentCollectionManager get_AgentCollectionManager()
protected java.lang.String get_Type()
public abstract java.io.File getDirectory()
protected java.io.File get_File()
protected void init_AgentID_Agent_HashMap()
public boolean remove(java.lang.Long a_AgentID)
_Agent_ID_Agent_HashMap.remove(a_AgentID);
if (_Agent_ID_Agent_HashMap.isEmpty()){
return true;
} else {
return false;
}
a_AgentID
-
public abstract void write(boolean handleOutOfMemoryError)
protected void write()
protected void swapToFileAgents()
protected void swapToFileAgent(java.lang.Long a_Agent_ID)
protected void swapToFileAgentExcept(java.lang.Long a_Agent_ID)
protected void swapToFileAgentsExcept(java.lang.Long a_Agent_ID)
public long getAgentCollection_ID()
public java.lang.Long getMinAgentID()
public java.lang.Long getMaxAgentID(java.lang.Long minAgentID)
minAgentID
-
public java.lang.Long getMaxAgentID()
public java.util.HashSet getPossibleAgentIDs_HashSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |