lime
Class Location
java.lang.Object
|
+--lime.Location
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- AgentLocation, HostLocation
- public abstract class Location
- extends java.lang.Object
- implements java.io.Serializable
The superclass of all locations, i.e., of both host and agent locations.
In Lime, a tuple is always physically stored in the interface tuple
space (ITS) of an agent. However, Lime operations refer to tuples whose
location can be expressed in terms of:
- the ITS where they are physically located. This location is called an
agent location and is embodied in the corresponding class
AgentLocation
.
- the logical host-level tuple space constituted by the union of the
ITSs of all the agents co-located on a given host. This location is called
a host location and is embodied in the corresponding class
HostLocation
.
Locations are frequently used to specify that a given tuple space
operation is concerned with a projection of the shared tuple space defined
by a pair of location parameters: the current and
destination location of tuples. Then, for instance,
LimeServerID hostID = ...;
Agent agent = ...;
ITuple template = new Tuple().addActual(1).addActual(2);
LimeTupleSpace ts = new LimeTupleSpace("myApplication");
Tuple t = ts.in(new HostLocation(hostID), new AgentLocation(agent.getMgr().getID()), template);
specifies a blocking in
operation that retrieves any tuple
matching template
whose destination is the ITS named
"myApplication"
of the agent
object, and that
are currently located on hostID
.
Lcoations can also be specified using "wild cards", for instance to
specifically allow the user to leave the value of a given location
unspecified, or specify that any location will do. For details of how to
use wild cards, refer to AgentLocation
and
HostLocation
.
- Version:
- 1.0 alpha
- Author:
- Amy L. Murphy, Gian Pietro Picco
- See Also:
LimeTupleSpace
,
AgentLocation
,
HostLocation
, Serialized Form
Method Summary |
boolean |
isWildCard()
Test whether the location is a wild card location. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
isWildCard
public boolean isWildCard()
- Test whether the location is a wild card location.
- Returns:
true
if the location is a wild card location.