org.apache.catalina.tribes.group.interceptors
Class StaticMembershipInterceptor
java.lang.Object
org.apache.catalina.tribes.group.ChannelInterceptorBase
org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
- All Implemented Interfaces:
- ChannelInterceptor, Heartbeat, MembershipListener
public class StaticMembershipInterceptor
- extends ChannelInterceptorBase
Methods inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBase |
accept, fireInterceptorEvent, getNext, getOptionFlag, getPrevious, heartbeat, memberAdded, memberDisappeared, messageReceived, okToProcess, sendMessage, setNext, setOptionFlag, setPrevious, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
members
protected java.util.ArrayList members
localMember
protected Member localMember
StaticMembershipInterceptor
public StaticMembershipInterceptor()
addStaticMember
public void addStaticMember(Member member)
removeStaticMember
public void removeStaticMember(Member member)
setLocalMember
public void setLocalMember(Member member)
hasMembers
public boolean hasMembers()
- has members
- Specified by:
hasMembers
in interface ChannelInterceptor
- Overrides:
hasMembers
in class ChannelInterceptorBase
- Returns:
- boolean - if the channel has members in its membership group
- See Also:
Channel.hasMembers()
getMembers
public Member[] getMembers()
- Get all current cluster members
- Specified by:
getMembers
in interface ChannelInterceptor
- Overrides:
getMembers
in class ChannelInterceptorBase
- Returns:
- all members or empty array
- See Also:
Channel.getMembers()
getMember
public Member getMember(Member mbr)
- Description copied from interface:
ChannelInterceptor
- Intercepts the code>Channel.getMember(Member) method
- Specified by:
getMember
in interface ChannelInterceptor
- Overrides:
getMember
in class ChannelInterceptorBase
- Parameters:
mbr
- Member
- Returns:
- Member
- See Also:
Channel.getMember(Member)
getLocalMember
public Member getLocalMember(boolean incAlive)
- Return the member that represents this node.
- Specified by:
getLocalMember
in interface ChannelInterceptor
- Overrides:
getLocalMember
in class ChannelInterceptorBase
- Parameters:
incAlive
- boolean
- Returns:
- Member
- See Also:
Channel.getLocalMember(boolean)
start
public void start(int svc)
throws ChannelException
- Send notifications upwards
- Specified by:
start
in interface ChannelInterceptor
- Overrides:
start
in class ChannelInterceptorBase
- Parameters:
svc
- int
- Throws:
ChannelException
- See Also:
Channel
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.