grinda.client
Interface TupleSpace


public interface TupleSpace

The interface used to communicate with the tuple space service. It provide all the operations needed to work on a tuple space.


Method Summary
 void addListener(OperationType operation, Tuple templ, TupleSpaceListener l)
          Adds a listener for a specific operation on the tuple space
 Tuple read(Tuple t, txservice.client.Transaction tx)
          Gets a tuple from the tuple space matching with the given template.
 Tuple[] readAll(Tuple t, txservice.client.Transaction tx)
          Gets all tuples from the tuple space matching with the given template.
 Tuple[] readAllp(Tuple t, txservice.client.Transaction tx)
          Gets all tuples from the tuple space matching with the given template.
 Tuple readp(Tuple t, txservice.client.Transaction tx)
          Gets a randomly choosen tuple from the tuple space matching with the given template.
 void removeListener(OperationType operation, Tuple templ, TupleSpaceListener l)
          Removes a listener for a specific operation on the tuple space
 Tuple take(Tuple t, txservice.client.Transaction tx)
          Extracts a randomly choosen tuple from the tuple space matching with the given template.
 Tuple[] takeAll(Tuple t, txservice.client.Transaction tx)
          Extracts all tuples from the tuple space matching with the given template.
 Tuple[] takeAllp(Tuple t, txservice.client.Transaction tx)
          Extracts all tuples from the tuple space matching with the given template.
 Tuple takep(Tuple t, txservice.client.Transaction tx)
          Extracts a randomly choosen tuple from the tuple space matching with the given template.
 void write(Tuple t, txservice.client.Transaction tx)
          Inserts a tuple in the tuple space
 void writeAll(Tuple[] t, txservice.client.Transaction tx)
          Inserts a tuple array in a tuple space
 

Method Detail

addListener

void addListener(OperationType operation,
                 Tuple templ,
                 TupleSpaceListener l)
                 throws java.rmi.RemoteException
Adds a listener for a specific operation on the tuple space

Parameters:
operation - the operation type (WRITE or DELETE)
templ - the template of the tuple that the listener is iteresting to
l - the listener
Throws:
java.rmi.RemoteException

removeListener

void removeListener(OperationType operation,
                    Tuple templ,
                    TupleSpaceListener l)
                    throws java.rmi.RemoteException
Removes a listener for a specific operation on the tuple space

Parameters:
operation - the operation type (WRITE or DELETE)
templ - the template of the tuple that the listener is iteresting to
l - the listener
Throws:
java.rmi.RemoteException

write

void write(Tuple t,
           txservice.client.Transaction tx)
           throws java.rmi.RemoteException
Inserts a tuple in the tuple space

Parameters:
t - the tuple
tx - the transaction
Throws:
java.rmi.RemoteException

writeAll

void writeAll(Tuple[] t,
              txservice.client.Transaction tx)
              throws java.rmi.RemoteException
Inserts a tuple array in a tuple space

Parameters:
t - the tuples
tx - the transaction
Throws:
java.rmi.RemoteException

take

Tuple take(Tuple t,
           txservice.client.Transaction tx)
           throws java.rmi.RemoteException
Extracts a randomly choosen tuple from the tuple space matching with the given template. If a matching tuple is not found, it blocks until a tuple of that kind will be inserted.

Parameters:
t - the template used by the matching
tx - the transaction
Returns:
the tuple matching the template
Throws:
java.rmi.RemoteException

read

Tuple read(Tuple t,
           txservice.client.Transaction tx)
           throws java.rmi.RemoteException
Gets a tuple from the tuple space matching with the given template. If a matching tuple was not found, it blocks until a tuple of that kind is present.

Parameters:
t - the template used by the matching
tx - the transaction
Returns:
the tuple matching the template
Throws:
java.rmi.RemoteException

takeAll

Tuple[] takeAll(Tuple t,
                txservice.client.Transaction tx)
                throws java.rmi.RemoteException
Extracts all tuples from the tuple space matching with the given template. If a matching tuple was not found, it blocks until a tuple of that kind is present.

Parameters:
t - the template used by the matching
tx - the transaction
Returns:
the tuple matching the template
Throws:
java.rmi.RemoteException

readAll

Tuple[] readAll(Tuple t,
                txservice.client.Transaction tx)
                throws java.rmi.RemoteException
Gets all tuples from the tuple space matching with the given template. If a matching tuple was not found, it blocks until a tuple of that kind is present.

Parameters:
t - the template used by the matching
tx - the transaction
Returns:
the tuple matching the template
Throws:
java.rmi.RemoteException

takep

Tuple takep(Tuple t,
            txservice.client.Transaction tx)
            throws java.rmi.RemoteException
Extracts a randomly choosen tuple from the tuple space matching with the given template. If a matching tuple is not found this method exits immediatly.

Parameters:
t - the template used by the matching
tx - the transaction
Returns:
the tuple matching the template
Throws:
java.rmi.RemoteException

readp

Tuple readp(Tuple t,
            txservice.client.Transaction tx)
            throws java.rmi.RemoteException
Gets a randomly choosen tuple from the tuple space matching with the given template. If a matching tuple is not found this method exits immediatly.

Parameters:
t - the template used by the matching
tx - the transaction
Returns:
the tuple matching the template
Throws:
java.rmi.RemoteException

takeAllp

Tuple[] takeAllp(Tuple t,
                 txservice.client.Transaction tx)
                 throws java.rmi.RemoteException
Extracts all tuples from the tuple space matching with the given template. If a matching tuple is not found this method exits immediatly.

Parameters:
t - the template used by the matching
tx - the transaction
Returns:
the tuple matching the template
Throws:
java.rmi.RemoteException

readAllp

Tuple[] readAllp(Tuple t,
                 txservice.client.Transaction tx)
                 throws java.rmi.RemoteException
Gets all tuples from the tuple space matching with the given template. If a matching tuple is not found this method exits immediatly.

Parameters:
t - the template used by the matching
tx - the transaction
Returns:
the tuple matching the template
Throws:
java.rmi.RemoteException


Copyright © 2006 Sirio Capizzi. All Rights Reserved.