public class SimpleCoordinator extends ChannelInterceptorBase
ChannelInterceptor.InterceptorEvent
optionFlag
Constructor and Description |
---|
SimpleCoordinator() |
Modifier and Type | Method and Description |
---|---|
Member |
getCoordinator() |
Member[] |
getView() |
boolean |
isCoordinator() |
void |
memberAdded(Member member)
A member was added to the group
|
void |
memberDisappeared(Member member)
A member was removed from the group
If the member left voluntarily, the Member.getCommand will contain the Member.SHUTDOWN_PAYLOAD data |
void |
start(int svc)
Starts up the channel.
|
void |
stop(int svc)
Shuts down the channel.
|
protected void |
viewChange(Member[] view)
Override to receive view changes.
|
fireInterceptorEvent, getLocalMember, getMember, getMembers, getNext, getOptionFlag, getPrevious, hasMembers, heartbeat, messageReceived, okToProcess, sendMessage, setNext, setOptionFlag, setPrevious
public void memberAdded(Member member)
MembershipListener
memberAdded
in interface MembershipListener
memberAdded
in class ChannelInterceptorBase
member
- Member - the member that was addedpublic void memberDisappeared(Member member)
MembershipListener
memberDisappeared
in interface MembershipListener
memberDisappeared
in class ChannelInterceptorBase
member
- MemberMember.SHUTDOWN_PAYLOAD
protected void viewChange(Member[] view)
view
- public void start(int svc) throws ChannelException
ChannelInterceptorBase
start
in interface ChannelInterceptor
start
in class ChannelInterceptorBase
svc
- int value of ChannelException
- if a startup error occurs or the service is already started.Channel
public void stop(int svc) throws ChannelException
ChannelInterceptorBase
stop
in interface ChannelInterceptor
stop
in class ChannelInterceptorBase
svc
- int value of ChannelException
- if a startup error occurs or the service is already started.Channel
public Member[] getView()
public Member getCoordinator()
public boolean isCoordinator()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.