|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lime.LimeSystemTupleSpace
The LimeSystemTupleSpace (LSTS) gives the Lime Application Programmer the ability to access the system context information including which hosts are present, which agents are present, and which tuple spaces are at the agents. We also introduce what we refer to as an anti-tuple for hosts, agents, and tuple spaces. An anti-tuple basically represents a component that was once present, but is no longer present. For example, when a host departs, its host tuple is replaced with a host anti-tuple. If that host space returns, its anti-tuple is removed and replaced with a "real" tuple.
Because engagement and disengagement are atomic, the LSTS at each host will be identical at all times, so there is no notion of sharing or federating the LSTS. It is simply a local tuple space.
A Host tuple has the format <_host, LimeServerID>
An Agent tuple has the format <_agent, AgentID, LimeServerID>
A TS tuple has the format <_tuplespace, String, AgentID>, where the string is the name of the tuple space.
The corresponding anti-tuples have the same format, but the tags are _host_gone, _agent_gone, and _tuplespace_gone.
At this point, the application programmer must be aware of the format of these tuples in order to properly access information from the LSTS.
The basic operations are a limited subset of the operations on the
LimeTupleSpace. Namely: rd
, rdp
,
rdg
, addReaction
, removeReaction
.
Operations which modify the tuple space are not allowed.
LimeTupleSpace
Constructor Summary | |
LimeSystemTupleSpace()
|
Method Summary | |
RegisteredReaction[] |
addReaction(LimeSystemReaction[] reactions)
Registers a group of reactions with the Lime System tuple space. |
lights.interfaces.ITuple |
rd(lights.interfaces.ITuple template)
Retrieves a copy of a tuple that matches a given template. |
lights.interfaces.ITuple[] |
rdg(lights.interfaces.ITuple template)
Retrieves all of the tuples that match a given template, or returns null if no matching tuple exists. |
lights.interfaces.ITuple |
rdp(lights.interfaces.ITuple template)
Retrieves a copy of a tuple that matches a given template, or returns null if no matching tuple exists. |
void |
removeReaction(RegisteredReaction[] reactions)
Deregisters a group of reactions. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LimeSystemTupleSpace()
Method Detail |
public lights.interfaces.ITuple rdp(lights.interfaces.ITuple template) throws TupleSpaceEngineException
null
if no matching tuple exists. The LSTS is searched.
If multiple tuples match the template, one is selected
non-deterministically.template
- the template the return tuple must be matched against.null
if the tuple cannot be found.TupleSpaceEngineException
- if a problem is encountered in the
underlying tuple space engine.public lights.interfaces.ITuple rd(lights.interfaces.ITuple template) throws TupleSpaceEngineException
template
- the template the return tuple must be matched against.TupleSpaceEngineException
- if a problem is encountered in the
underlying tuple space engine.public lights.interfaces.ITuple[] rdg(lights.interfaces.ITuple template) throws TupleSpaceEngineException
null
if no matching tuple exists.template
- the template the return tuple must be matched against.null
if the tuple cannot be found.TupleSpaceEngineException
- if a problem is encountered in the
underlying tuple space engine.public RegisteredReaction[] addReaction(LimeSystemReaction[] reactions) throws TupleSpaceEngineException
reactions
- an array containing the reactions to be registered.TupleSpaceEngineException
- if a problem is encountered in the
underlying tuple space engine.public void removeReaction(RegisteredReaction[] reactions) throws TupleSpaceEngineException, NoSuchReactionException
NoSuchReactionException
is raised.reactions
- an array containing the reactions to be deregistered.NoSuchReactionException
- if some of the reactions are actually
not registered.TupleSpaceEngineException
- if a problem is encountered in the
underlying tuple space engine.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |