All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----java.util.Dictionary | +----java.util.Hashtable | +----JavaGroups.DistributedHashtable
Both keys and values added to the hashtable must be serializable, the reason
being that they will be sent across the network to all replicas of the group. Having said
this, it is now for example possible to add RMI remote objects to the hashtable as they
are derived from java.rmi.server.RemoteObject
which in turn is serializable.
This allows to lookup shared distributed objects by their name and invoke methods on them,
regardless of one's onw location. A DistributedHashtable
thus allows to
implement a distributed naming service in just a couple of lines.
An instance of this class will contact an existing member of the group to fetch its
initial state (using the state exchange funclet StateExchangeFunclet
.
public DistributedHashtable(String groupname, ChannelFactory factory, String properties)
public void AddNotifier(DistributedHashtable. Notification n)
public Object put(Object key, Object value)
public void clear()
public Object remove(Object key)
public synchronized Object _put(Object key, Object value)
public synchronized void _clear()
public synchronized Object _remove(Object key)
public void Receive(Message msg)
public Object GetState()
public void SetState(Object new_state)
All Packages Class Hierarchy This Package Previous Next Index