grinda.impl.tuplespace
Interface TupleContainer

All Known Implementing Classes:
DynamicContainer, HashContainer, SimpleContainer

public interface TupleContainer

Implemented by classes that store InternalTuples behaving themselves like tuplespaces. Due the architecture of the service all operations are non blocking.


Method Summary
 void add(InternalTuple t)
          Adds an InternalTuple to the container
 boolean isEmpty()
          Checks if the container is empty
 InternalTuple lookup(InternalTuple pattern)
          Looks up a tuples that match the given template using the associative matching
 InternalTuple[] lookupAll(InternalTuple pattern)
          Looks up all the tuples that match the given template using the associative matching
 InternalTuple remove(InternalTuple pattern)
          Removes a the tuple that match the given template using the associative matching
 InternalTuple[] removeAll(InternalTuple pattern)
          Removes all the tuples that match the given template using the associative matching
 int size()
          Gets the number of tuple stored
 java.util.Collection tuples()
          Gets a collection of all the tuple stored
 

Method Detail

add

void add(InternalTuple t)
Adds an InternalTuple to the container

Parameters:
t - the tuple

lookupAll

InternalTuple[] lookupAll(InternalTuple pattern)
Looks up all the tuples that match the given template using the associative matching

Parameters:
pattern - the template
Returns:
the matching tuples or null if there are nones

lookup

InternalTuple lookup(InternalTuple pattern)
Looks up a tuples that match the given template using the associative matching

Parameters:
pattern - the template
Returns:
a tuples found or null if there is none

remove

InternalTuple remove(InternalTuple pattern)
Removes a the tuple that match the given template using the associative matching

Parameters:
pattern - the template
Returns:
the tuple removed or null if there are none

removeAll

InternalTuple[] removeAll(InternalTuple pattern)
Removes all the tuples that match the given template using the associative matching

Parameters:
pattern - the template
Returns:
the tuples removed or null if there are nones

size

int size()
Gets the number of tuple stored

Returns:
the size

isEmpty

boolean isEmpty()
Checks if the container is empty

Returns:
true if it is empty false otherwise

tuples

java.util.Collection tuples()
Gets a collection of all the tuple stored

Returns:
tuples


Copyright © 2006 Sirio Capizzi. All Rights Reserved.