|
Apache Tomcat 7.0.28 | ||||||||
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 | |
---|---|
void |
broadcast(ChannelMessage message)
Broadcasts a message to all members |
Member |
findMemberByName(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. |
String[] |
getMembersByName()
Return all members by name |
Properties |
getProperties()
Returns the properties for the configuration used. |
boolean |
hasMembers()
|
void |
removeMembershipListener()
removes the membership listener. |
void |
setDomain(byte[] domain)
|
void |
setLocalMemberProperties(String listenHost,
int listenPort,
int securePort,
int udpPort)
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(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(Properties properties)
start()
method is called.
The properties are implementation specific.
properties
- - to be used to configure the membership service.Properties getProperties()
void start() throws Exception
Exception
- if the service fails to start.void start(int level) throws Exception
level
- - level MBR_RX starts listening for members, level MBR_TX
starts broad casting the server
Exception
- if the service fails to start.
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
Exception
- if the service fails to stop
IllegalArgumentException
- if the level is incorrect.boolean hasMembers()
Member getMember(Member mbr)
mbr
- Member
Member[] getMembers()
Member getLocalMember(boolean incAliveTime)
String[] getMembersByName()
Member findMemberByName(String name)
void setLocalMemberProperties(String listenHost, int listenPort, int securePort, int udpPort)
void setMembershipListener(MembershipListener listener)
listener
- The listenervoid removeMembershipListener()
void setPayload(byte[] payload)
payload
- byte[]void setDomain(byte[] domain)
void broadcast(ChannelMessage message) throws ChannelException
message
-
ChannelException
|
Apache Tomcat 7.0.28 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |