org.jgroups.demos

Class DistributedHashtableDemo

Implemented Interfaces:
ActionListener, WindowListener, DistributedHashtable.Notification

public class DistributedHashtableDemo
extends Frame
implements WindowListener, ActionListener, DistributedHashtable.Notification

Uses the DistributedHashtable building block. The latter subclasses java.util.Hashtable and overrides the methods that modify the hashtable (e.g. put()). Those methods are multicast to the group, whereas read-only methods such as get() use the local copy. A DistributedHashtable is created given the name of a group; all hashtables with the same name find each other and form a group.

Author:
Bela Ban

Constructor Summary

DistributedHashtableDemo()

Method Summary

void
actionPerformed(ActionEvent e)
void
contentsCleared()
void
contentsSet(Map m)
void
entryRemoved(Object key)
void
entrySet(Object key, Object value)
static void
main(args[] )
void
start(ChannelFactory factory, String props, boolean persist)
void
viewChange(Vector joined, Vector left)
void
windowActivated(WindowEvent e)
void
windowClosed(WindowEvent e)
void
windowClosing(WindowEvent e)
void
windowDeactivated(WindowEvent e)
void
windowDeiconified(WindowEvent e)
void
windowIconified(WindowEvent e)
void
windowOpened(WindowEvent e)

Constructor Details

DistributedHashtableDemo

public DistributedHashtableDemo()

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)


contentsCleared

public void contentsCleared()
Specified by:
contentsCleared in interface DistributedHashtable.Notification


contentsSet

public void contentsSet(Map m)
Specified by:
contentsSet in interface DistributedHashtable.Notification


entryRemoved

public void entryRemoved(Object key)
Specified by:
entryRemoved in interface DistributedHashtable.Notification


entrySet

public void entrySet(Object key,
                     Object value)
Specified by:
entrySet in interface DistributedHashtable.Notification


main

public static void main(args[] )


start

public void start(ChannelFactory factory,
                  String props,
                  boolean persist)
            throws ChannelException


viewChange

public void viewChange(Vector joined,
                       Vector left)
Specified by:
viewChange in interface DistributedHashtable.Notification


windowActivated

public void windowActivated(WindowEvent e)


windowClosed

public void windowClosed(WindowEvent e)


windowClosing

public void windowClosing(WindowEvent e)


windowDeactivated

public void windowDeactivated(WindowEvent e)


windowDeiconified

public void windowDeiconified(WindowEvent e)


windowIconified

public void windowIconified(WindowEvent e)


windowOpened

public void windowOpened(WindowEvent e)


Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.