org.jgroups.protocols
Class PARTITIONER
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.
static class | PARTITIONER.PartitionerHeader - The Partitioner header normally (type = NORMAL) contains just the partition number that is checked to discard messages
received from other partitions.
|
down_handler , down_prot , down_queue , down_thread , down_thread_prio , log , observer , props , stack , stats , trace , up_handler , up_prot , up_queue , up_thread , up_thread_prio , warn |
void | down(Event evt) - 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
|
String | getName() - All protocol names have to be unique !
|
void | reset() - Just remove if you don't need to reset any state
|
boolean | setProperties(Properties props)
|
void | up(Event evt) - Discards Messages with the wrong partition number and sets local partition number if
it receives a COMMAND Header
|
destroy , down , downThreadEnabled , dumpStats , enableStats , getDownProtocol , getDownQueue , getName , getProperties , getUpProtocol , getUpQueue , handleSpecialDownEvent , init , isTrace , isWarn , passDown , passUp , printStats , providedDownServices , providedUpServices , receiveDownEvent , receiveUpEvent , requiredDownServices , requiredUpServices , resetStats , setDownProtocol , setObserver , setProperties , setPropertiesInternal , setProtocolStack , setTrace , setUpProtocol , setWarn , start , startDownHandler , startUpHandler , statsEnabled , stop , stopInternal , up , upThreadEnabled |
down
public void down(Event evt)
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
- down in interface Protocol
getName
public String getName()
All protocol names have to be unique !
- getName in interface Protocol
reset
public void reset()
Just remove if you don't need to reset any state
up
public void up(Event evt)
Discards Messages with the wrong partition number and sets local partition number if
it receives a COMMAND Header
- up in interface Protocol
Copyright B) 1998-2005 Bela Ban. All Rights Reserved.