lime
Class LimeSystemTSMgr

java.lang.Object
  extended byjava.lang.Thread
      extended bylime.LimeTSMgr
          extended bylime.LimeSystemTSMgr
All Implemented Interfaces:
LimeConstants, java.lang.Runnable

class LimeSystemTSMgr
extends LimeTSMgr

Manages the Lime System Tuple Space.


Field Summary
static java.lang.String AGENT
           
static short AGENT_BYE
           
static java.lang.String AGENT_GONE
           
static short AGENT_HELLO
           
static int AGENT_ID_TAG
           
static short AGENT_LOCALHOST
           
static short AGENT_NOTINSYS
           
static short AGENT_REMOTE
           
static short AGENT_UNSPECIFIED
           
static short DATA
           
static short DECLARE_LEADER
           
static short DISENGAGE_AGENT
           
static short DISENGAGE_HOST
           
static short ENGAGE_AGENT
           
static short ENGAGE_HOST
           
private static java.lang.String ERRMSG
           
static short GO
           
static java.lang.String HOST
           
static int HOST_ADDR_TAG
           
static short HOST_BYE
           
static java.lang.String HOST_GONE
           
static short HOST_HELLO
           
static short HOST_LOCALHOST
           
static short HOST_NOTINSYS
           
static short HOST_REMOTE
           
static int HOST_TUPLE_HOST_TAG
           
static short HOST_UNSPECIFIED
           
(package private)  Queue incomingEvents
           
(package private)  Queue incomingOps
           
(package private)  Queue incomingTransactionStarts
           
(package private)  QueueWaiter incomingWaiter
           
static int INCOMMING_EVENTS_QUEUE
           
static int INCOMMING_OPS_QUEUE
           
static int INCOMMING_TRANSACTION_STARTS_QUEUE
           
static short ING
           
static short INITIATOR_REQ
           
static short INST_REACTS_TO
           
static short INST_REM_UPON_LISTENER
           
static short INST_UPON_LISTENER
           
(package private)  boolean inTransaction
          Indicates whether the tuple space is participating in a transaction.
static short LOCAL_SYS_TAKE
           
static int MAX_ROUNDS
           
(package private)  java.lang.String name
          The name of the tuple space.
(package private) static java.util.Hashtable namedTS
          Holds tuple spaces keyed by their names.
static short OUTG
           
(package private)  java.util.Hashtable pendingWrite
          Maps the sequence number to the TupleOpDescriptor.
static short RDG
           
(package private)  Reactor reactor
          The local reactor.
static short REACTS_TO
           
static short READ
           
static short READY
           
static short READY_SPECIAL
           
static short REM_ING
           
static short REM_OUTG
           
static short REM_OUTG_ACK
           
static short REM_RDG
           
static short REM_SYS_READ
           
static short REM_SYS_TAKE
           
static short REMOVE_REACTS_TO
           
static short REMOVE_REM_UPON_LISTENER
           
static short REMOVE_UPON
           
(package private)  java.util.Hashtable replyTuples
          Used for upon and reactions.
static short REQUEST_TRANSACTION
           
(package private)  java.util.Hashtable savedReactions
          Used to reinstall the reaction of an upon of a waiting operation
static short SET_HOST
           
static short SET_SHARED
           
static short SETUP
           
static short SETUP_SPECIAL
           
static short START
           
static short SYS_READ
           
static short SYS_REPLY
           
static short SYS_TAKE
           
(package private) static LimeSystemTSMgr sysMgr
          The LimeSystemTupleSpace manager.
static short TAKE
           
static short TRANSACTION_GRANTED
           
(package private)  TransactionMgr transactionMgr
          The transaction manager.
static java.lang.String TS
           
static java.lang.String TS_GONE
           
static int TS_ID_TAG
           
(package private)  lights.interfaces.ITupleSpace tupleSpace
          A named tuple space.
static int TYPE_TAG
           
static short UPON
           
static short UPON_EVENT
           
(package private)  UponMgr upons
          both pending and uninstalled upons...
static java.lang.String VERSION
           
static short WAIT_TO_READ
           
static short WAIT_TO_TAKE
           
static short WRITE
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
(package private) LimeSystemTSMgr()
           
 
Method Summary
(package private)  void addAgent(AgentID agent, LimeServerID host)
           
(package private)  void addAntiTuple(lights.interfaces.ITuple t)
           
(package private)  void addHost(LimeServerID host)
           
private  void addSystemTuple(lights.interfaces.ITuple t)
           
(package private)  void addTupleSpace(java.lang.String tsname, AgentID agent)
           
(package private)  boolean contains(AgentID agent)
          Returns whether or not the specific agent is in the current lime system.
(package private)  boolean contains(LimeServerID host)
          Returns whether or not the specific host is in the current lime system.
(package private)  boolean containsAgents()
           
(package private)  void doRemOutg(RemoteTupleOpDescriptor opDesc, boolean sendAck)
          Put the tuple that comes from remotely into the tuple space.
(package private)  void doSysReply(RemoteTupleOpDescriptor opDesc)
          A SysReply message is the actual tuple being returned from the remote system.
(package private)  void doWait(TupleOpDescriptor opDesc)
          Force the tuple to be looked for locally, then have a reaction installed if the tuple is not found
(package private)  AgentID[] getAgents(LimeServerID host)
          Return an array containing the AgentID of each agent present on a given host.
(package private)  LimeServerID[] getAllHosts()
          Return an array containing the LimeServerIDs of each host in the LSTS.
(package private)  java.lang.String getAntiTupleType(lights.interfaces.ITuple t)
           
(package private)  LimeServerID getHost(AgentID agentID)
          given an agentID, give the InetAddress of the host from The method is package visible so that the RemoteUponListener and SystemUponListener can take advantage of it.
(package private)  LimeServerID getLeader()
          Returns the LimeServerID of the host that is the leader of this group.
(package private) static java.lang.String getOpType(short type)
          Used for debugging purposes.
(package private)  RegisteredReaction[] getRemRegReactByAgent(AgentID subscriber)
           
(package private)  Lock getTransactionLock()
           
(package private)  java.lang.String[] getTupleSpaces(AgentID agent)
          Return an array containing the name of the tuple spaces belonging to a given agent.
(package private)  java.lang.String[] getTupleSpaces(LimeServerID host)
          Return an array containing the name of all the tuple spaces belonging to all the agents residing on the given host.
(package private)  boolean hasAnyAgents(LimeServerID host)
          Returns true if the host as any agents.
(package private)  boolean hasAnyTupleSpaces(AgentID agent)
          Returns true if the specified agent has any tuple spaces left in the shared space.
(package private)  boolean hasTupleSpace(AgentID agentID, java.lang.String tsname)
          given an agent id, look into the LSTS to see if the agent has the same named tuple space as this
(package private)  boolean hasTupleSpace(LimeServerID host, java.lang.String tsname)
          Returns true if the specified host has a tuple space with the specified name.
(package private)  boolean isAgentOnHost(AgentID agent, LimeServerID host)
           
(package private)  boolean isLastAgent(AgentID aID, java.lang.String tsname)
          Check whether a given agent is the last one that owns a given tuple space.
(package private)  void isolateLSTS()
          remove all agents/tspaces/hosts not on this getServerID()
private  lights.interfaces.ITuple makeTemplate(java.lang.String type, LimeServerID host, AgentID aid, java.lang.String tsname)
          Makes a template.
(package private)  void mergeMisplaced(java.util.Vector tuples, java.util.Vector upons)
           
(package private)  lights.interfaces.ITuple[] mergePrivateWithPublic(LimeTupleSpace lts)
          Called from the Transaction manager to merge the upons/reactions of a private tuple space into the public space, and to return the tuples which are to be handed to the reactor when the transaction is complete
(package private)  void performOp(OpDescriptor opDesc)
           
(package private)  void postOp(LocalOpDescriptor opDesc)
          Places operations into the INCOMMING_OPS_QUEUE queue.
(package private)  void printAgents()
           
(package private)  void printHosts()
           
(package private)  void printMisplacedTuples(java.util.Vector t)
          Used for debugging purposes.
(package private)  lights.interfaces.ITuple readOrTakeTuple(short type, lights.interfaces.ITuple template)
          read or take a tuple (based on the type passed) from the tuple space of this manager
(package private)  short relativeLocation(lights.interfaces.IField locField, java.lang.String tsname)
           
(package private)  short relativeLocation(Location loc, java.lang.String tsname)
          Figure out whether the location parameter is a host or agent, then specifically the type of host or agent.
(package private)  void removeAgent(AgentID agent)
           
(package private)  void removeHost(LimeServerID host)
          Removes a host tuple from the tuple space, replaces it with its antituple.
(package private)  void removeTupleSpace(java.lang.String tsname, AgentID agent)
           
 void run()
           
(package private) static lights.interfaces.ITuple[] takeTupleSpaceProjection(lights.interfaces.ITupleSpace ts, AgentID[] agents, int index)
          Returns the set of tuples that represent a given projection of the tuple space.
(package private)  void writeSystemTuple(lights.interfaces.ITuple t)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ERRMSG

private static final java.lang.String ERRMSG
See Also:
Constant Field Values

INCOMMING_EVENTS_QUEUE

public static final int INCOMMING_EVENTS_QUEUE
See Also:
Constant Field Values

INCOMMING_OPS_QUEUE

public static final int INCOMMING_OPS_QUEUE
See Also:
Constant Field Values

INCOMMING_TRANSACTION_STARTS_QUEUE

public static final int INCOMMING_TRANSACTION_STARTS_QUEUE
See Also:
Constant Field Values

namedTS

static java.util.Hashtable namedTS
Holds tuple spaces keyed by their names.


incomingOps

Queue incomingOps

incomingEvents

Queue incomingEvents

incomingTransactionStarts

Queue incomingTransactionStarts

incomingWaiter

QueueWaiter incomingWaiter

inTransaction

boolean inTransaction
Indicates whether the tuple space is participating in a transaction.


transactionMgr

TransactionMgr transactionMgr
The transaction manager.


sysMgr

static LimeSystemTSMgr sysMgr
The LimeSystemTupleSpace manager.


tupleSpace

lights.interfaces.ITupleSpace tupleSpace
A named tuple space.


reactor

Reactor reactor
The local reactor.


savedReactions

java.util.Hashtable savedReactions
Used to reinstall the reaction of an upon of a waiting operation


replyTuples

java.util.Hashtable replyTuples
Used for upon and reactions.


pendingWrite

java.util.Hashtable pendingWrite
Maps the sequence number to the TupleOpDescriptor.


name

java.lang.String name
The name of the tuple space.


upons

UponMgr upons
both pending and uninstalled upons...


VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values

WRITE

public static final short WRITE
See Also:
Constant Field Values

OUTG

public static final short OUTG
See Also:
Constant Field Values

REM_OUTG_ACK

public static final short REM_OUTG_ACK
See Also:
Constant Field Values

TAKE

public static final short TAKE
See Also:
Constant Field Values

WAIT_TO_TAKE

public static final short WAIT_TO_TAKE
See Also:
Constant Field Values

ING

public static final short ING
See Also:
Constant Field Values

READ

public static final short READ
See Also:
Constant Field Values

WAIT_TO_READ

public static final short WAIT_TO_READ
See Also:
Constant Field Values

RDG

public static final short RDG
See Also:
Constant Field Values

REACTS_TO

public static final short REACTS_TO
See Also:
Constant Field Values

UPON

public static final short UPON
See Also:
Constant Field Values

REMOVE_REACTS_TO

public static final short REMOVE_REACTS_TO
See Also:
Constant Field Values

REMOVE_UPON

public static final short REMOVE_UPON
See Also:
Constant Field Values

INST_REACTS_TO

public static final short INST_REACTS_TO
See Also:
Constant Field Values

INST_UPON_LISTENER

public static final short INST_UPON_LISTENER
See Also:
Constant Field Values

INST_REM_UPON_LISTENER

public static final short INST_REM_UPON_LISTENER
See Also:
Constant Field Values

REMOVE_REM_UPON_LISTENER

public static final short REMOVE_REM_UPON_LISTENER
See Also:
Constant Field Values

REM_SYS_TAKE

public static final short REM_SYS_TAKE
See Also:
Constant Field Values

REM_SYS_READ

public static final short REM_SYS_READ
See Also:
Constant Field Values

REM_ING

public static final short REM_ING
See Also:
Constant Field Values

REM_RDG

public static final short REM_RDG
See Also:
Constant Field Values

SYS_TAKE

public static final short SYS_TAKE
See Also:
Constant Field Values

SYS_READ

public static final short SYS_READ
See Also:
Constant Field Values

REM_OUTG

public static final short REM_OUTG
See Also:
Constant Field Values

UPON_EVENT

public static final short UPON_EVENT
See Also:
Constant Field Values

SYS_REPLY

public static final short SYS_REPLY
See Also:
Constant Field Values

LOCAL_SYS_TAKE

public static final short LOCAL_SYS_TAKE
See Also:
Constant Field Values

SET_SHARED

public static final short SET_SHARED
See Also:
Constant Field Values

SET_HOST

public static final short SET_HOST
See Also:
Constant Field Values

DECLARE_LEADER

public static final short DECLARE_LEADER
See Also:
Constant Field Values

ENGAGE_AGENT

public static final short ENGAGE_AGENT
See Also:
Constant Field Values

ENGAGE_HOST

public static final short ENGAGE_HOST
See Also:
Constant Field Values

DISENGAGE_AGENT

public static final short DISENGAGE_AGENT
See Also:
Constant Field Values

DISENGAGE_HOST

public static final short DISENGAGE_HOST
See Also:
Constant Field Values

GO

public static final short GO
See Also:
Constant Field Values

INITIATOR_REQ

public static final short INITIATOR_REQ
See Also:
Constant Field Values

SETUP

public static final short SETUP
See Also:
Constant Field Values

READY

public static final short READY
See Also:
Constant Field Values

START

public static final short START
See Also:
Constant Field Values

DATA

public static final short DATA
See Also:
Constant Field Values

SETUP_SPECIAL

public static final short SETUP_SPECIAL
See Also:
Constant Field Values

READY_SPECIAL

public static final short READY_SPECIAL
See Also:
Constant Field Values

REQUEST_TRANSACTION

public static final short REQUEST_TRANSACTION
See Also:
Constant Field Values

TRANSACTION_GRANTED

public static final short TRANSACTION_GRANTED
See Also:
Constant Field Values

HOST_BYE

public static final short HOST_BYE
See Also:
Constant Field Values

HOST_HELLO

public static final short HOST_HELLO
See Also:
Constant Field Values

AGENT_BYE

public static final short AGENT_BYE
See Also:
Constant Field Values

AGENT_HELLO

public static final short AGENT_HELLO
See Also:
Constant Field Values

HOST_LOCALHOST

public static final short HOST_LOCALHOST
See Also:
Constant Field Values

HOST_REMOTE

public static final short HOST_REMOTE
See Also:
Constant Field Values

HOST_NOTINSYS

public static final short HOST_NOTINSYS
See Also:
Constant Field Values

HOST_UNSPECIFIED

public static final short HOST_UNSPECIFIED
See Also:
Constant Field Values

AGENT_LOCALHOST

public static final short AGENT_LOCALHOST
See Also:
Constant Field Values

AGENT_REMOTE

public static final short AGENT_REMOTE
See Also:
Constant Field Values

AGENT_NOTINSYS

public static final short AGENT_NOTINSYS
See Also:
Constant Field Values

AGENT_UNSPECIFIED

public static final short AGENT_UNSPECIFIED
See Also:
Constant Field Values

TYPE_TAG

public static final int TYPE_TAG
See Also:
Constant Field Values

HOST_TUPLE_HOST_TAG

public static final int HOST_TUPLE_HOST_TAG
See Also:
Constant Field Values

HOST_ADDR_TAG

public static final int HOST_ADDR_TAG
See Also:
Constant Field Values

AGENT_ID_TAG

public static final int AGENT_ID_TAG
See Also:
Constant Field Values

TS_ID_TAG

public static final int TS_ID_TAG
See Also:
Constant Field Values

HOST

public static final java.lang.String HOST
See Also:
Constant Field Values

AGENT

public static final java.lang.String AGENT
See Also:
Constant Field Values

TS

public static final java.lang.String TS
See Also:
Constant Field Values

HOST_GONE

public static final java.lang.String HOST_GONE
See Also:
Constant Field Values

AGENT_GONE

public static final java.lang.String AGENT_GONE
See Also:
Constant Field Values

TS_GONE

public static final java.lang.String TS_GONE
See Also:
Constant Field Values

MAX_ROUNDS

public static final int MAX_ROUNDS
See Also:
Constant Field Values
Constructor Detail

LimeSystemTSMgr

LimeSystemTSMgr()
Method Detail

doWait

void doWait(TupleOpDescriptor opDesc)
      throws lights.interfaces.TupleSpaceException,
             java.io.IOException
Force the tuple to be looked for locally, then have a reaction installed if the tuple is not found

Overrides:
doWait in class LimeTSMgr
Parameters:
opDesc - the waiting operation to be performed
Throws:
lights.interfaces.TupleSpaceException
java.io.IOException

getAllHosts

LimeServerID[] getAllHosts()
Return an array containing the LimeServerIDs of each host in the LSTS. The array has length zero if no host is present.


getAgents

AgentID[] getAgents(LimeServerID host)
Return an array containing the AgentID of each agent present on a given host. The array has length zero if no agent is present.


getHost

LimeServerID getHost(AgentID agentID)
given an agentID, give the InetAddress of the host from The method is package visible so that the RemoteUponListener and SystemUponListener can take advantage of it.

Parameters:
agentID - a value of type 'AgentID'
Returns:
the inetaddress of the host the agent is located on
Throws:
lights.interfaces.TupleSpaceException - if an error occurs

getTupleSpaces

java.lang.String[] getTupleSpaces(AgentID agent)
Return an array containing the name of the tuple spaces belonging to a given agent. The array has length zero if no tuple space is found.


getTupleSpaces

java.lang.String[] getTupleSpaces(LimeServerID host)
Return an array containing the name of all the tuple spaces belonging to all the agents residing on the given host. The array has length zero if no tuple space is found.


addHost

void addHost(LimeServerID host)

addAgent

void addAgent(AgentID agent,
              LimeServerID host)

addTupleSpace

void addTupleSpace(java.lang.String tsname,
                   AgentID agent)

addSystemTuple

private void addSystemTuple(lights.interfaces.ITuple t)
                     throws lights.interfaces.TupleSpaceException
Throws:
lights.interfaces.TupleSpaceException

writeSystemTuple

void writeSystemTuple(lights.interfaces.ITuple t)

removeHost

void removeHost(LimeServerID host)
Removes a host tuple from the tuple space, replaces it with its antituple.


removeAgent

void removeAgent(AgentID agent)

removeTupleSpace

void removeTupleSpace(java.lang.String tsname,
                      AgentID agent)

addAntiTuple

void addAntiTuple(lights.interfaces.ITuple t)

getAntiTupleType

java.lang.String getAntiTupleType(lights.interfaces.ITuple t)

contains

boolean contains(AgentID agent)
Returns whether or not the specific agent is in the current lime system.

Parameters:
agent - the agent's AgentID
Returns:
true if the agent is in the LimeSystemTupleSpace

contains

boolean contains(LimeServerID host)
Returns whether or not the specific host is in the current lime system.

Parameters:
host - the hosts's LimeServerID
Returns:
true if the host is in the LimeSystemTupleSpace

hasTupleSpace

boolean hasTupleSpace(AgentID agentID,
                      java.lang.String tsname)
given an agent id, look into the LSTS to see if the agent has the same named tuple space as this

Parameters:
agentID - a value of type 'AgentID'
tsname - a name of a tuple space
Returns:
true if the tuple exists, false otherwise
Throws:
lights.interfaces.TupleSpaceException - if an error occurs

hasTupleSpace

boolean hasTupleSpace(LimeServerID host,
                      java.lang.String tsname)
Returns true if the specified host has a tuple space with the specified name.


containsAgents

boolean containsAgents()

isAgentOnHost

boolean isAgentOnHost(AgentID agent,
                      LimeServerID host)

hasAnyTupleSpaces

boolean hasAnyTupleSpaces(AgentID agent)
Returns true if the specified agent has any tuple spaces left in the shared space.

Parameters:
agent - a value of type 'AgentID'

hasAnyAgents

boolean hasAnyAgents(LimeServerID host)
Returns true if the host as any agents.

Returns:
true if the host as any agents.

isLastAgent

boolean isLastAgent(AgentID aID,
                    java.lang.String tsname)
Check whether a given agent is the last one that owns a given tuple space.


makeTemplate

private lights.interfaces.ITuple makeTemplate(java.lang.String type,
                                              LimeServerID host,
                                              AgentID aid,
                                              java.lang.String tsname)
Makes a template. All templates have the following fields: LimeTupleID, AgentLocation.UNSPECIFIED, AgentLocation.UNSPECIFIED, and type.


isolateLSTS

void isolateLSTS()
remove all agents/tspaces/hosts not on this getServerID()


getLeader

LimeServerID getLeader()
Returns the LimeServerID of the host that is the leader of this group. This is determined by looking at the hashCode of the LimeServerID of each host. The leader is the one with the lowest hashcode.

Returns:
The LimeServerID of the leader of this group, or null if there are no hosts.

relativeLocation

short relativeLocation(Location loc,
                       java.lang.String tsname)
Figure out whether the location parameter is a host or agent, then specifically the type of host or agent.

Parameters:
loc - Any location, host or agent
Returns:
One of the constants: HOST_UNSPECIFIED, HOST_LOCALHOST, HOST_NOTINSYS, HOST_REMOTE, AGENT_UNSPECIFIED, AGENT_LOCALHOST, AGENT_NOTINSYS, AGENT_REMOTE
Throws:
lights.interfaces.TupleSpaceException - if an error occurs

relativeLocation

short relativeLocation(lights.interfaces.IField locField,
                       java.lang.String tsname)

printHosts

void printHosts()

printAgents

void printAgents()

run

public void run()
Specified by:
run in interface java.lang.Runnable

postOp

void postOp(LocalOpDescriptor opDesc)
Places operations into the INCOMMING_OPS_QUEUE queue. It then blocks the calling thread on the lock contained within the LocalOpDescriptor.


performOp

void performOp(OpDescriptor opDesc)
         throws lights.interfaces.TupleSpaceException,
                java.io.IOException
Throws:
lights.interfaces.TupleSpaceException
java.io.IOException

doSysReply

void doSysReply(RemoteTupleOpDescriptor opDesc)
A SysReply message is the actual tuple being returned from the remote system. Unlike the UponEvent, it is not possible for the upon to be deregistered because there is at most one outstanding remote system take operation, and this is it returning. In other words, the registered reaction must be in pendingUpon

Parameters:
opDesc - the returned remote opearation descriptor, containing the tuple copy and sequence number

doRemOutg

void doRemOutg(RemoteTupleOpDescriptor opDesc,
               boolean sendAck)
         throws lights.interfaces.TupleSpaceException
Put the tuple that comes from remotely into the tuple space. The agent should be present at this host, unless something goes wrong. In other words, the disengagement protocol should not allow an agent to leave a host if it has pending REM_OUTG events in the queue. This is something to address when we get to unannounced disconnection.

Parameters:
opDesc - the opearation containing the tuple to be written
sendAck - if this method is called from a transaction, the ack should not be sent, otherwise the ack should be sent.
Throws:
lights.interfaces.TupleSpaceException - if an error occurs

readOrTakeTuple

lights.interfaces.ITuple readOrTakeTuple(short type,
                                         lights.interfaces.ITuple template)
read or take a tuple (based on the type passed) from the tuple space of this manager

Parameters:
type - WAIT_TO_READ, SYS_READ, REM_SYS_READ, or the corresponding TAKE operations
template - the template to mbe matched
Returns:
the found tuple, or null if no tuple is found

takeTupleSpaceProjection

static lights.interfaces.ITuple[] takeTupleSpaceProjection(lights.interfaces.ITupleSpace ts,
                                                           AgentID[] agents,
                                                           int index)
                                                    throws TupleSpaceEngineException,
                                                           lights.interfaces.TupleSpaceException
Returns the set of tuples that represent a given projection of the tuple space. The tuples are actually withdrawn from the tuple space.

Parameters:
ts - the tuple space to be searched for.
agents - the array of agents to look for.
index - the field index that must be matched.
Returns:
the array of tuples that satisfy the match.
Throws:
TupleSpaceEngineException(tse)
TupleSpaceEngineException
lights.interfaces.TupleSpaceException

getTransactionLock

Lock getTransactionLock()

mergePrivateWithPublic

lights.interfaces.ITuple[] mergePrivateWithPublic(LimeTupleSpace lts)
                                            throws TupleSpaceEngineException
Called from the Transaction manager to merge the upons/reactions of a private tuple space into the public space, and to return the tuples which are to be handed to the reactor when the transaction is complete

Parameters:
lts - the previously public tuple space to be made public
Returns:
The tuples of the private tuple space
Throws:
TupleSpaceEngineException

mergeMisplaced

void mergeMisplaced(java.util.Vector tuples,
                    java.util.Vector upons)
              throws TupleSpaceEngineException
Throws:
TupleSpaceEngineException

getRemRegReactByAgent

RegisteredReaction[] getRemRegReactByAgent(AgentID subscriber)

printMisplacedTuples

void printMisplacedTuples(java.util.Vector t)
Used for debugging purposes.


getOpType

static java.lang.String getOpType(short type)
Used for debugging purposes.