Class SimpleCoordinator
java.lang.Object
org.apache.catalina.tribes.group.ChannelInterceptorBase
org.apache.catalina.tribes.group.interceptors.SimpleCoordinator
- All Implemented Interfaces:
- ChannelInterceptor,- Heartbeat,- MembershipListener
A dinky coordinator, just uses a sorted version of the member array.
- Author:
- rnewson
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.catalina.tribes.ChannelInterceptorChannelInterceptor.InterceptorEvent
- 
Field SummaryFields inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBaseoptionFlag
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionMember[]getView()booleanvoidmemberAdded(Member member) A member was added to the groupvoidmemberDisappeared(Member member) A member was removed from the group
 If the member left voluntarily, the Member.getCommand will contain the Member.SHUTDOWN_PAYLOAD datavoidstart(int svc) Starts up the channel.voidstop(int svc) Shuts down the channel.protected voidviewChange(Member[] view) Override to receive view changes.Methods inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBasefireInterceptorEvent, getChannel, getLocalMember, getMember, getMembers, getNext, getOptionFlag, getPrevious, hasMembers, heartbeat, messageReceived, okToProcess, sendMessage, setChannel, setNext, setOptionFlag, setPrevious
- 
Constructor Details- 
SimpleCoordinatorpublic SimpleCoordinator()
 
- 
- 
Method Details- 
memberAddedDescription copied from interface:MembershipListenerA member was added to the group- Specified by:
- memberAddedin interface- MembershipListener
- Overrides:
- memberAddedin class- ChannelInterceptorBase
- Parameters:
- member- Member - the member that was added
 
- 
memberDisappearedDescription copied from interface:MembershipListenerA member was removed from the group
 If the member left voluntarily, the Member.getCommand will contain the Member.SHUTDOWN_PAYLOAD data- Specified by:
- memberDisappearedin interface- MembershipListener
- Overrides:
- memberDisappearedin class- ChannelInterceptorBase
- Parameters:
- member- Member
- See Also:
 
- 
viewChangeOverride to receive view changes.- Parameters:
- view- The members array
 
- 
startDescription copied from class:ChannelInterceptorBaseStarts up the channel. This can be called multiple times for individual services to start The svc parameter can be the logical or value of any constants- Specified by:
- startin interface- ChannelInterceptor
- Overrides:
- startin class- ChannelInterceptorBase
- Parameters:
- svc- int value of
 DEFAULT - will start all services
 MBR_RX_SEQ - starts the membership receiver
 MBR_TX_SEQ - starts the membership broadcaster
 SND_TX_SEQ - starts the replication transmitter
 SND_RX_SEQ - starts the replication receiver
- Throws:
- ChannelException- if a startup error occurs or the service is already started.
- See Also:
 
- 
stopDescription copied from class:ChannelInterceptorBaseShuts down the channel. This can be called multiple times for individual services to shutdown The svc parameter can be the logical or value of any constants- Specified by:
- stopin interface- ChannelInterceptor
- Overrides:
- stopin class- ChannelInterceptorBase
- Parameters:
- svc- int value of
 DEFAULT - will shutdown all services
 MBR_RX_SEQ - stops the membership receiver
 MBR_TX_SEQ - stops the membership broadcaster
 SND_TX_SEQ - stops the replication transmitter
 SND_RX_SEQ - stops the replication receiver
- Throws:
- ChannelException- if a startup error occurs or the service is already started.
- See Also:
 
- 
getView
- 
getCoordinator
- 
isCoordinatorpublic boolean isCoordinator()
 
-