org.jgroups.demos

Class CausalDemo

Implemented Interfaces:
Runnable

public class CausalDemo
extends java.lang.Object
implements Runnable

Simple causal demo where each member bcast a consecutive letter from the alphabet and picks the next member to transmit the next letter. Start a few instances of CausalDemo and pass a paramter "-start" to a CausalDemo that initiates transmission of a letter A. All participanting members should have correct alphabet. DISCARD layer has been added to simulate lost messages, thus forcing delaying of delivery of a certain alphabet letter until the causally prior one has been received. Remove CAUSAL from the stack and witness how FIFO alone doesn't provide this guarantee.
Author:
Vladimir Blagojevic

Constructor Summary

CausalDemo(boolean start)

Method Summary

String
getNext(String c)
void
listAlphabet()
static void
main(args[] )
void
run()

Constructor Details

CausalDemo

public CausalDemo(boolean start)

Method Details

getNext

public String getNext(String c)

listAlphabet

public void listAlphabet()

main

public static void main(args[] )

run

public void run()

Copyright B) 1998-2005 Bela Ban. All Rights Reserved.