|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RemoteObject | +--java.rmi.server.RemoteServer | +--java.rmi.server.UnicastRemoteObject | +--metaglue.AgentAgent | +--agentland.util.NotifierAgent | +--metaglue.CatalogAgent
Inner classes inherited from class metaglue.AgentAgent |
AgentAgent.Attribute |
Field Summary | |
protected static int |
GRAVEDIGGER_SLEEP
How long gravedigger should sleep between body searches. |
protected boolean |
purge_icebox
|
protected boolean |
should_dig
Whether the grave_digger should quit. |
protected boolean |
watch_methods
Check whether to watch and update method calls. |
Fields inherited from class java.rmi.server.RemoteObject |
ref |
Fields inherited from interface metaglue.Agent |
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING |
Constructor Summary | |
CatalogAgent(AgentID agentID)
|
|
CatalogAgent(AgentID agentID,
boolean purge_icebox)
Main catalogAgent constructor |
Method Summary | |
void |
add(AgentID agentID,
Remote agentAgent)
|
protected void |
add(AgentID agentID,
Remote agentAgent,
boolean freeze)
|
void |
addCatalogMonitor(CatalogMessageListener cml)
These are methods added for the specific catalog log propagation routines due to bugs involved in trying to have the catalog propagate messages normally |
protected void |
addToChainingClassLoader(AgentID aid)
|
protected void |
body_hunt()
This is what gravedigger runs to look for dead agents--pulling out dead agents allows the enumerateAgents thing to work better |
protected String |
catalogHostName()
Get host machine catalog is on. |
int |
checkStatus(AgentID agentID)
Returns status of given agent: Agent.NOT_RUNNING, STARTING, NO_METAGLUE, DIED, ALIVE |
protected void |
commitAgent(AgentID agentID,
Remote agentAgent,
boolean isMetaglue,
boolean freeze)
Commit agent to actual repository. |
protected void |
dealWithBody(String lst,
AgentID listingID)
Verify and then possibly remove the given agent (with catalog listing name. |
void |
doneBooting()
|
void |
enableMethodTracing()
|
protected void |
endMethod(int cnt)
|
Vector |
enumerateAgents()
Return an enumeration of all of the AgentID's in this catalog |
Vector |
enumerateAgents(Filter filter)
Get all agents which pass the test of the given filter. |
protected void |
freezeStub(AgentID id,
Remote stub)
Freeze a stub in the table in case the catalog dies. |
Catalog |
getCatalog()
|
protected void |
gravedigger()
The sleep, then search-and-destroy loop for finding dead agents. |
void |
log(int lvl,
String msg)
Log, and tell all catalogmonitors about the log as well. |
Agent |
lookup(AgentID agentID)
Find an agent by id. |
Agent |
lookupBlocking(AgentID agentID)
Do not try if agent not found. |
Agent |
lookupBlocking(AgentID agentID,
boolean retry_if_not_found)
Does lookup, if it finds an agentstartingexception, it waits until something changes. |
protected void |
purgeIcebox()
Empty out the icebox. |
protected boolean |
rebindPlaceholder(AgentPlaceHolder existingBinding,
AgentID agentID,
Remote agentAgent,
boolean freeze)
|
void |
rebuildTables()
|
void |
remove(AgentID agentID)
Remove agent from the catalog. |
void |
removeCatalogMonitor(CatalogMessageListener cml)
Removes the catalog monitor specified. |
protected void |
removeFromChainingClassLoader(AgentID aid)
|
protected void |
removeFrozen(AgentID id)
|
protected void |
removeFrozen(int iid,
AgentID id)
|
void |
replaceStartingMG(AgentID aID,
AgentID mID)
|
protected void |
setupIcebox()
Not private so MetaglueAgent.main() can call it just prior to letting catalog loose on world. |
protected int |
startMethod(String name)
|
protected void |
startMourning(AgentID agentID)
This methods sends out messages about agents that have been found dead |
void |
waitForSomethingToHappen(String reas)
|
Methods inherited from class agentland.util.NotifierAgent |
addSpy, addSpy, getNoteTypes, getNotifyTable, gossip, hack_notify, lookupSpy, notify, notify, passNotify, putNotifyTable, removeAllSpies, removeNotifyTable, removeSpy, removeSpy, removeSpy, removeSpy, removeSpy |
Methods inherited from class metaglue.AgentAgent |
addMonitor, alive, buildEHAFor, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getOldLogs, getProperties, getProxyHandlerClass, getSociety, installAPH, log, log, lookupClass, reliesOn, reliesOn, reliesOn, reliesOnSynch, removeAPHFromCatalog, removeFrozen, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, toString, whereAreYou |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toStub |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface agentland.util.Notifier |
addSpy, addSpy, gossip, notify, passNotify, removeAllSpies, removeSpy, removeSpy |
Methods inherited from interface metaglue.Agent |
addMonitor, alive, getAgentID, getMetaglueAgentID, getOldLogs, shutdown, startup, whereAreYou |
Field Detail |
protected static final int GRAVEDIGGER_SLEEP
protected boolean purge_icebox
protected boolean should_dig
protected boolean watch_methods
Constructor Detail |
public CatalogAgent(AgentID agentID) throws RemoteException
public CatalogAgent(AgentID agentID, boolean purge_icebox) throws RemoteException
Method Detail |
public void enableMethodTracing()
public void doneBooting()
public int checkStatus(AgentID agentID) throws RemoteException
checkStatus
in interface Catalog
public Agent lookup(AgentID agentID) throws AgentNotFoundException, AgentStartingException
lookup
in interface Catalog
public void replaceStartingMG(AgentID aID, AgentID mID)
replaceStartingMG
in interface Catalog
public void waitForSomethingToHappen(String reas)
public Agent lookupBlocking(AgentID agentID) throws AgentNotFoundException
lookupBlocking
in interface Catalog
public Agent lookupBlocking(AgentID agentID, boolean retry_if_not_found) throws AgentNotFoundException
Catalog
lookupBlocking
in interface Catalog
public Catalog getCatalog() throws RemoteException
getCatalog
in class AgentAgent
public void add(AgentID agentID, Remote agentAgent) throws RemoteException, AlreadyBoundException
add
in interface Catalog
public void remove(AgentID agentID) throws RemoteException, AccessException
remove
in interface Catalog
public void rebuildTables()
public Vector enumerateAgents() throws RemoteException
enumerateAgents
in interface Catalog
public Vector enumerateAgents(Filter filter)
enumerateAgents
in interface Catalog
metaglue.Catalog
public void addCatalogMonitor(CatalogMessageListener cml) throws RemoteException
addCatalogMonitor
in interface Catalog
public void removeCatalogMonitor(CatalogMessageListener cml) throws RemoteException
removeCatalogMonitor
in interface Catalog
cml
- a CatalogMessageListener
valuepublic void log(int lvl, String msg)
log
in class AgentAgent
metaglue.AgentAgent
level
- The log level.info
- The string to send to the log.LogStream
protected int startMethod(String name)
protected void endMethod(int cnt)
protected String catalogHostName() throws RemoteException
protected void commitAgent(AgentID agentID, Remote agentAgent, boolean isMetaglue, boolean freeze)
protected boolean rebindPlaceholder(AgentPlaceHolder existingBinding, AgentID agentID, Remote agentAgent, boolean freeze) throws RemoteException
protected void add(AgentID agentID, Remote agentAgent, boolean freeze) throws RemoteException, AlreadyBoundException
freeze
- whether to freeze stub in icebox--this should be true.
it is false when the defrosting happens and the tables are being
rebuilt.protected void startMourning(AgentID agentID) throws RemoteException
agentID
- agentID of a dead agentprotected void purgeIcebox()
protected void setupIcebox()
protected void removeFrozen(AgentID id)
protected void removeFrozen(int iid, AgentID id)
iid
- icebox id of agent in question.id
- agent idprotected void freezeStub(AgentID id, Remote stub)
protected void body_hunt()
protected void dealWithBody(String lst, AgentID listingID)
protected void gravedigger()
protected void addToChainingClassLoader(AgentID aid)
protected void removeFromChainingClassLoader(AgentID aid)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |