ibis.satin
Class SatinTupleSpace

java.lang.Object
  extended byibis.satin.SatinTupleSpace
All Implemented Interfaces:
ibis.satin.impl.Config

public class SatinTupleSpace
extends java.lang.Object
implements ibis.satin.impl.Config

This class implements an immutable global tuple space. A tuple consists of a key (a String) and its associated data (a serializable object). Note that the data is not immutable, because the get()method does not make a copy.


Field Summary
 
Fields inherited from interface ibis.satin.impl.Config
ABORT_STATS, ABORT_TIMING, abortLogger, ABORTS, ADD_REPLICA_TIMING, ASSERTS, commLogger, CRASH_TIMING, FAULT_TOLERANCE, FT_NAIVE, FT_STATS, FT_WITHOUT_ABORTS, ftLogger, GLOBAL_RESULT_TABLE_REPLICATED, GRT_MESSAGE_COMBINING, GRT_STATS, GRT_TIMING, grtLogger, HANDLE_MESSAGES_IN_LATENCY, IDLE_TIMING, inletLogger, POLL_FREQ, POLL_RECEIVEPORT, POLL_TIMING, PROPERTY_PREFIX, s_aborts, s_asserts, s_ft, s_ft_grt_comb, s_ft_grt_repl, s_ft_naive, s_ft_noAborts, s_in_latency, s_poll_freq, s_poll_port, s_stats, s_stats_abort, s_stats_ft, s_stats_grt, s_stats_spawn, s_stats_steal, s_stats_tuple, s_timing, s_timing_abort, s_timing_check, s_timing_crash, s_timing_grt, s_timing_idle, s_timing_poll, s_timing_repl, s_timing_steal, s_timing_tuple, s_tuple_multi, s_tuple_numbered, s_tuple_ordened, s_tuple_ordered, SPAWN_STATS, spawnLogger, STATS, STEAL_STATS, STEAL_TIMING, stealLogger, SUPPORT_TUPLE_MULTICAST, sysprops, TABLE_CHECK_TIMING, TIMING, TUPLE_ORDERED, TUPLE_STATS, TUPLE_TIMING, tupleLogger
 
Constructor Summary
SatinTupleSpace()
           
 
Method Summary
static void add(java.lang.String key, java.io.Serializable data)
          Adds an element with the specified key to the global tuple space.
static java.io.Serializable get(java.lang.String key)
          Retrieves an element from the tuple space.
static java.io.Serializable peek(java.lang.String key)
          Retrieves an element from the tuple space.
static void remove(java.lang.String key)
          Removes an element from the tuple space.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SatinTupleSpace

public SatinTupleSpace()
Method Detail

add

public static void add(java.lang.String key,
                       java.io.Serializable data)
Adds an element with the specified key to the global tuple space. If a tuple with this key already exists, it is overwritten with the new element. The propagation to other processors can take an arbitrary amount of time, but it is guaranteed that after multiple updates by the same processor, eventually all processors will have the latest value.

However, if multiple processors update the value of the same key, the value of an updated key can be different on different processors.

Parameters:
key - The key of the new tuple.
data - The data associated with the key.

get

public static java.io.Serializable get(java.lang.String key)
Retrieves an element from the tuple space. If the element is not in the space yet, this operation blocks until the element is inserted.

Parameters:
key - the key of the element retrieved.
Returns:
the data associated with the key.

peek

public static java.io.Serializable peek(java.lang.String key)
Retrieves an element from the tuple space. If the element is not in the space yet, this operation returns null.

Parameters:
key - the key of the element retrieved.
Returns:
the data associated with the key.

remove

public static void remove(java.lang.String key)
Removes an element from the tuple space.

Parameters:
key - the key of the tuple to be removed.


The Ibis project