org.jgroups.demos

Class DistributedQueueDemo

Implemented Interfaces:
ActionListener, WindowListener, DistributedQueue.Notification

public class DistributedQueueDemo
extends Frame
implements WindowListener, ActionListener, DistributedQueue.Notification

Uses the DistributedQueue building block. The latter subclasses org.jgroups.util.Queue and overrides the methods that modify the queue (e.g. add()). Those methods are multicast to the group, whereas read-only methods such as peek() use the local copy. A DistributedQueue is created given the name of a group; all queues with the same name find each other and form a group.
Author:
Romuald du Song

Constructor Summary

DistributedQueueDemo()

Method Summary

void
actionPerformed(ActionEvent e)
void
contentsCleared()
void
contentsSet(Collection new_entries)
void
entryAdd(Object value)
void
entryRemoved(Object key)
static void
main(String[] args)
void
start(String groupname, ChannelFactory factory, String props)
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

DistributedQueueDemo

public DistributedQueueDemo()

Method Details

actionPerformed

public void actionPerformed(ActionEvent e)

contentsCleared

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

contentsSet

public void contentsSet(Collection new_entries)
Specified by:
contentsSet in interface DistributedQueue.Notification

entryAdd

public void entryAdd(Object value)
Specified by:
entryAdd in interface DistributedQueue.Notification

entryRemoved

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

main

public static void main(String[] args)

start

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

viewChange

public void viewChange(Vector joined,
                       Vector left)
Specified by:
viewChange in interface DistributedQueue.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.