org.jgroups.protocols

Class SHUFFLE

public class SHUFFLE extends Protocol implements Runnable

This layer shuffles upcoming messages, put it just above your bottom layer. If you system sends less than 2 messages per sec you can notice a latency due to this layer.

Author: Gianluca Collot

Constructor Summary
SHUFFLE()
Method Summary
StringgetName()
voidrun()
Removes a random chosen message from the messages List<\code> if there are less than 10 messages in the List it waits some time to ensure to chose from a set of messages > 1.
booleansetProperties(Properties props)
voidstart()
Starts the messagesHandler<\code>
voidstop()
Stops the messagesHandler
voidup(Event evt)
Adds upcoming messages to the messages List<\code> where the messagesHandler<\code> retrieves them.

Constructor Detail

SHUFFLE

public SHUFFLE()

Method Detail

getName

public String getName()

run

public void run()
Removes a random chosen message from the messages List<\code> if there are less than 10 messages in the List it waits some time to ensure to chose from a set of messages > 1.

setProperties

public boolean setProperties(Properties props)

start

public void start()
Starts the messagesHandler<\code>

stop

public void stop()
Stops the messagesHandler

up

public void up(Event evt)
Adds upcoming messages to the messages List<\code> where the messagesHandler<\code> retrieves them.
Copyright ? 1998-2005 Bela Ban. All Rights Reserved.