|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MembershipService
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).
Field Summary | |
---|---|
static int |
MBR_RX
|
static int |
MBR_TX
|
Method Summary | |
---|---|
Member |
findMemberByName(java.lang.String name)
Return the member by name |
Member |
getLocalMember(boolean incAliveTime)
Returns the member object that defines this member |
Member |
getMember(Member mbr)
|
Member[] |
getMembers()
Returns a list of all the members in the cluster. |
java.lang.String[] |
getMembersByName()
Return all members by name |
java.util.Properties |
getProperties()
Returns the properties for the configuration used. |
boolean |
hasMembers()
|
void |
removeMembershipListener()
removes the membership listener. |
void |
setDomain(byte[] domain)
|
void |
setLocalMemberProperties(java.lang.String listenHost,
int listenPort)
Sets the local member properties for broadcasting |
void |
setMembershipListener(MembershipListener listener)
Sets the membership listener, only one listener can be added. |
void |
setPayload(byte[] payload)
Set a payload to be broadcasted with each membership broadcast. |
void |
setProperties(java.util.Properties properties)
Sets the properties for the membership service. |
void |
start()
Starts the membership service. |
void |
start(int level)
Starts the membership service. |
void |
stop(int level)
Starts the membership service. |
Field Detail |
---|
static final int MBR_RX
static final int MBR_TX
Method Detail |
---|
void setProperties(java.util.Properties properties)
start()
method is called.
The properties are implementation specific.
properties
- - to be used to configure the membership service.java.util.Properties getProperties()
void start() throws java.lang.Exception
java.lang.Exception
- if the service fails to start.void start(int level) throws java.lang.Exception
level
- - level MBR_RX starts listening for members, level MBR_TX
starts broad casting the server
java.lang.Exception
- if the service fails to start.
java.lang.IllegalArgumentException
- if the level is incorrect.void stop(int level)
level
- - level MBR_RX stops listening for members, level MBR_TX
stops broad casting the server
java.lang.Exception
- if the service fails to stop
java.lang.IllegalArgumentException
- if the level is incorrect.boolean hasMembers()
Member getMember(Member mbr)
mbr
- Member
Member[] getMembers()
Member getLocalMember(boolean incAliveTime)
java.lang.String[] getMembersByName()
Member findMemberByName(java.lang.String name)
void setLocalMemberProperties(java.lang.String listenHost, int listenPort)
void setMembershipListener(MembershipListener listener)
listener
- The listenervoid removeMembershipListener()
void setPayload(byte[] payload)
payload
- byte[]void setDomain(byte[] domain)
|
Apache Tomcat 6.0.53 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |