|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--springs.access.LocalAgentReferences
Stores local references to agents.
Field Summary | |
private java.util.Hashtable |
_agentReferences
|
private java.util.Hashtable |
_timesToDelete
|
Constructor Summary | |
LocalAgentReferences()
Constructor. |
Method Summary | |
springs.access.AgentReference |
getReference(java.lang.String agentName)
Obtains a reference to an agent, null if any reference is available. |
int |
releaseAndRemoveOldReferences()
Release local references that are out-of-date and references that have been marked to be removed. |
void |
removeReference(java.lang.String agentName)
Removes a reference to an agent. |
springs.access.AgentReference |
removeReferenceImmediately(java.lang.String agentName)
Removes a reference immediately, without waiting for possible later updates. |
int |
size()
Obtains the number of references. |
void |
updateReference(springs.access.AgentReference newReference)
Updates the given reference. |
void |
updateReferenceImmediately(springs.agent.SpringsAgent agent,
java.lang.String localContextName)
Updates a reference immediately. |
void |
updateTimeToDelete(java.lang.String agentName,
long millisToKeep)
Updates the time to delete the local reference to a certain agent, by considering that the reference has been used again just now. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Hashtable _timesToDelete
private java.util.Hashtable _agentReferences
Constructor Detail |
public LocalAgentReferences()
Method Detail |
public void updateReference(springs.access.AgentReference newReference)
newReference
- the agent reference.AgentReference
public springs.access.AgentReference getReference(java.lang.String agentName)
agentName
- the name of the agent.
AgentReference
public void removeReference(java.lang.String agentName)
agentName
- the name of the agent.String
public springs.access.AgentReference removeReferenceImmediately(java.lang.String agentName)
agentName
- the name of the agent.
AgentReference
,
String
public void updateReferenceImmediately(springs.agent.SpringsAgent agent, java.lang.String localContextName)
agent
- the agent.localContextName
- the local context name.SpringsAgent
,
String
public void updateTimeToDelete(java.lang.String agentName, long millisToKeep)
agentName
- the name of the agent.millisToKeep
- the number of milliseconds to keep the reference.String
public int releaseAndRemoveOldReferences() throws ContextException
ContextException
- if there is a context exception.ContextException
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |