| org.cougaar.core.service.IncarnationService
IncarnationService | public interface IncarnationService extends Service(Code) | | This service tracks agent incarnation numbers, which are
updated every time the agent restarts (excluding agent
mobility).
This is used to detect restarted agents and reconcile
with them.
|
Inner Class :interface Callback | |
getIncarnation | long getIncarnation(MessageAddress addr)(Code) | | the agent incarnation, or -1 if the agent or itsincarnation is not known. |
getSubscriptions | Map getSubscriptions()(Code) | | Get a map of our subscriptions (addrs to callbacks).
Map>MessageAddress, Set>Callback<< |
subscribe | boolean subscribe(MessageAddress addr, Callback cb)(Code) | | Subscribe to incarnation change callbacks.
Equivalent to subscribe(addr, cb, 0) .
true if the callback was not already subscribed |
subscribe | boolean subscribe(MessageAddress addr, Callback cb, long inc)(Code) | | Subscribe to incarnation change callbacks with an initial
minimal incarnation value filter.
The incarnation is used to restore a subscription after
capturing it from
IncarnationService.getIncarnation(MessageAddress) ,
specifically for mobile agents.
true if the callback was not already subscribed |
unsubscribe | boolean unsubscribe(MessageAddress addr, Callback cb)(Code) | | Unsubscribe from incarnation change callbacks.
true if the callback was subscribed |
updateIncarnation | int updateIncarnation(MessageAddress addr, long inc)(Code) | | Update an agent's incarnation.
0 if unchanged, -1 if the incarnation is old,or 1 if the incarnation is new (which will invoke thecallbacks in the caller's thread) |
|
|