| |
|
| java.lang.Object java.lang.Thread org.jgroups.stack.UpHandler org.jgroups.protocols.PARTITIONER
PARTITIONER | public class PARTITIONER extends Protocol (Code) | | This layer can be put on top of the bottommost layer and is useful to simulate partitions.
It simply adds a header with its partition number and discards Messages with other partition numbers.
If it receives an Event of type Event.SET_PARTITIONS it sends a Header of type COMMAND with the Hashtable
contained in the Event argument to set the partitions of ALL processes (not just processes of the current view but
every process with the same group address that receives the message.
|
Inner Class :public static class PartitionerHeader extends Header | |
my_partition | int my_partition(Code) | | |
down | public void down(Event evt)(Code) | | Adds to Messages a Header with the local partitin number and if receives a SET_PARTITIONS Event sends
a new Message with a PartitionerHeader set to COMMAND that carries the Hashtable
|
getName | public String getName()(Code) | | All protocol names have to be unique !
|
reset | public void reset()(Code) | | Just remove if you don't need to reset any state
|
up | public void up(Event evt)(Code) | | Discards Messages with the wrong partition number and sets local partition number if
it receives a COMMAND Header
|
Fields inherited from org.jgroups.stack.UpHandler | final protected Log log(Code)(Java Doc)
|
|
|
|