| org.apache.catalina.tribes.MembershipService
All known Subclasses: org.apache.catalina.tribes.membership.McastService,
MembershipService | public interface MembershipService (Code) | | MembershipService Interface
The MembershipService interface is the membership component
at the bottom layer, the IO layer (for layers see the javadoc for the
Channel interface).
author: Filip Hanik version: $Revision: 467222 $, $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $ |
Field Summary | |
final public static int | MBR_RX | final public static int | MBR_TX |
MBR_RX | final public static int MBR_RX(Code) | | |
MBR_TX | final public static int MBR_TX(Code) | | |
findMemberByName | public Member findMemberByName(String name)(Code) | | Return the member by name
|
getLocalMember | public Member getLocalMember(boolean incAliveTime)(Code) | | Returns the member object that defines this member
|
getMembers | public Member[] getMembers()(Code) | | Returns a list of all the members in the cluster.
|
getMembersByName | public String[] getMembersByName()(Code) | | Return all members by name
|
hasMembers | public boolean hasMembers()(Code) | | true if the the group contains members |
removeMembershipListener | public void removeMembershipListener()(Code) | | removes the membership listener.
|
setDomain | public void setDomain(byte[] domain)(Code) | | |
setLocalMemberProperties | public void setLocalMemberProperties(String listenHost, int listenPort)(Code) | | Sets the local member properties for broadcasting
|
setMembershipListener | public void setMembershipListener(MembershipListener listener)(Code) | | Sets the membership listener, only one listener can be added.
If you call this method twice, the last listener will be used.
Parameters: listener - The listener |
setPayload | public void setPayload(byte[] payload)(Code) | | Set a payload to be broadcasted with each membership
broadcast.
Parameters: payload - byte[] |
setProperties | public void setProperties(java.util.Properties properties)(Code) | | Sets the properties for the membership service. This must be called before
the start() method is called.
The properties are implementation specific.
Parameters: properties - - to be used to configure the membership service. |
start | public void start() throws java.lang.Exception(Code) | | Starts the membership service. If a membership listeners is added
the listener will start to receive membership events.
Performs a start level 1 and 2
throws: java.lang.Exception - if the service fails to start. |
start | public void start(int level) throws java.lang.Exception(Code) | | Starts the membership service. If a membership listeners is added
the listener will start to receive membership events.
Parameters: level - - level MBR_RX starts listening for members, level MBR_TX starts broad casting the server throws: java.lang.Exception - if the service fails to start. throws: java.lang.IllegalArgumentException - if the level is incorrect. |
stop | public void stop(int level)(Code) | | Starts the membership service. If a membership listeners is added
the listener will start to receive membership events.
Parameters: level - - level MBR_RX stops listening for members, level MBR_TX stops broad casting the server throws: java.lang.Exception - if the service fails to stop throws: java.lang.IllegalArgumentException - if the level is incorrect. |
|
|