Package org.apache.catalina.tribes
Interface MembershipProvider
- All Known Implementing Classes:
CloudMembershipProvider
,DNSMembershipProvider
,KubernetesMembershipProvider
,McastServiceImpl
,MembershipProviderBase
,StaticMembershipProvider
public interface MembershipProvider
-
Method Summary
Modifier and TypeMethodDescriptionGet the specified member from the associated membership.Member[]
Get the members from the associated membership.boolean
void
init
(Properties properties) Initialize the membership provider with the specified configuration.void
setMembershipListener
(MembershipListener listener) Set the associated membership listener.void
setMembershipService
(MembershipService service) Set the associated membership service.void
start
(int level) Start the membership provider.boolean
stop
(int level) Stop the membership provider.
-
Method Details
-
init
Initialize the membership provider with the specified configuration.- Parameters:
properties
- configuration- Throws:
Exception
- if an error occurs
-
start
Start the membership provider.- Parameters:
level
- the readiness level
Channel.DEFAULT - will start all services
Channel.MBR_RX_SEQ - starts the membership receiver
Channel.MBR_TX_SEQ - starts the membership broadcaster- Throws:
Exception
- if an error occurs
-
stop
Stop the membership provider.- Parameters:
level
- the readiness level
Channel.DEFAULT - will stop all services
Channel.MBR_RX_SEQ - stops the membership receiver
Channel.MBR_TX_SEQ - stops the membership broadcaster- Returns:
true
if successful- Throws:
Exception
- if an error occurs
-
setMembershipListener
Set the associated membership listener.- Parameters:
listener
- the listener
-
setMembershipService
Set the associated membership service.- Parameters:
service
- the service
-
hasMembers
boolean hasMembers()- Returns:
true
if there are members
-
getMember
Get the specified member from the associated membership.- Parameters:
mbr
- the member- Returns:
- the member
-
getMembers
Member[] getMembers()Get the members from the associated membership.- Returns:
- the members
-