|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.stack.Protocol
org.jgroups.protocols.SHUFFLE
public class SHUFFLE
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.
Field Summary |
---|
Fields inherited from class org.jgroups.stack.Protocol |
---|
down_prot, log, props, stack, stats, up_prot |
Constructor Summary | |
---|---|
SHUFFLE()
|
Method Summary | |
---|---|
java.lang.String |
getName()
|
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. |
boolean |
setProperties(java.util.Properties props)
Configures the protocol initially. |
void |
start()
Starts the messagesHandler<\code> |
void |
stop()
Stops the messagesHandler |
java.lang.Object |
up(Event evt)
Adds upcoming messages to the messages List<\code> where the |
Methods inherited from class org.jgroups.stack.Protocol |
---|
destroy, down, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getProperties, getProtocolStack, getThreadFactory, getTransport, getUpProtocol, init, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setPropertiesInternal, setProtocolStack, setUpProtocol, statsEnabled, upThreadEnabled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SHUFFLE()
Method Detail |
---|
public java.lang.String getName()
getName
in class Protocol
public boolean setProperties(java.util.Properties props)
Protocol
"loopback=false;unicast_inport=4444"
setProperties
in class Protocol
public java.lang.Object up(Event evt)
messages List<\code> where the messagesHandler<\code>
retrieves them.
- Overrides:
up
in class Protocol
public void start() throws java.lang.Exception
messagesHandler<\code>
- Overrides:
start
in class Protocol
- Throws:
java.lang.Exception
- Thrown if protocol cannot be started successfully. This will cause the ProtocolStack
to fail, so Channel.connect(String)
will throw an exception
public void stop()
stop
in class Protocol
public void run()
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.
- Specified by:
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |