|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlime.Location
lime.AgentLocation
Defines the location of a tuple with respect to an Agent
.
In general AgentLocation
is used for specifying the
current and/or destination location when invoking location-dependent
operations (see Location
class). If the
AgentLocation
is used as the current field, the interface
tuple space (ITS) of the agent is used. When an
AgentLocation
is used as the destination field, the tuples
could be misplaced only if the agent is not present.
Similar to class HostLocation
, it is possible to define an
unspecified location using the wild card location constant
AgentLocation.UNSPECIFIED
. Then, for instance:
ITuple t = ts.in(new HostLocation(new LimeServerID(InetAddress.getLocalHost()), LimeServer.getServer().getPort()), AgentLocation.UNSPECIFIED, template);specifies a blocking
in
that looks for any tuple residing on
the current host, independently from the tuple's final location.
LimeTupleSpace
,
HostLocation
,
Serialized FormField Summary | |
(package private) AgentID |
agentID
|
static AgentLocation |
UNSPECIFIED
Defines a wild card location that denotes an unspecified agent location. |
Fields inherited from class lime.Location |
_ANY, _NORMAL, _UNKNOWN, _UNSPECIFIED, wildCard |
Constructor Summary | |
|
AgentLocation(AgentID agentID)
Create a location corresponding to the ITS of a given agent. |
(package private) |
AgentLocation(short wildCard)
Create a wild card agent location, specified by one of the constants in the Location class. |
Method Summary | |
boolean |
equals(java.lang.Object l)
Tests two agent locations for equality. |
java.lang.String |
toString()
Returns a concise textual description for this object. |
Methods inherited from class lime.Location |
isWildCard |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
AgentID agentID
public static final AgentLocation UNSPECIFIED
Constructor Detail |
public AgentLocation(AgentID agentID)
agentID
- the agent identifier.AgentLocation(short wildCard)
Location
class.
wildCard
- the constant specifying the wild card location.Method Detail |
public boolean equals(java.lang.Object l)
l
- an agent location object (it can be a wild card location).
true
is returned if both locations correspond to the same
agent. If the locations are wild cards, then true
is
returned if they correspond to the same constant (e.g, the method returns
true
when comparing two UNSPECIFIED
locations). In all the remaining cases false
is returned.public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |