Class KubernetesMembershipProvider
- java.lang.Object
-
- org.apache.catalina.tribes.membership.MembershipProviderBase
-
- org.apache.catalina.tribes.membership.cloud.CloudMembershipProvider
-
- org.apache.catalina.tribes.membership.cloud.KubernetesMembershipProvider
-
- All Implemented Interfaces:
ChannelListener
,Heartbeat
,MembershipProvider
public class KubernetesMembershipProvider extends CloudMembershipProvider
AMembershipProvider
that uses Kubernetes API to retrieve the members of a cluster.
-
-
Field Summary
-
Fields inherited from class org.apache.catalina.tribes.membership.cloud.CloudMembershipProvider
connectionTimeout, CUSTOM_ENV_PREFIX, expirationTime, headers, localIp, md5, port, readTimeout, sm, startTime, streamProvider, url
-
Fields inherited from class org.apache.catalina.tribes.membership.MembershipProviderBase
executor, membership, membershipListener, service
-
-
Constructor Summary
Constructors Constructor Description KubernetesMembershipProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Member[]
fetchMembers()
Fetch current cluster members from the cloud orchestration.protected void
parsePods(java.io.Reader reader, java.util.List<MemberImpl> members)
void
start(int level)
boolean
stop(int level)
-
Methods inherited from class org.apache.catalina.tribes.membership.cloud.CloudMembershipProvider
accept, getEnv, getNamespace, heartbeat, init, messageReceived, updateMember
-
Methods inherited from class org.apache.catalina.tribes.membership.MembershipProviderBase
getMember, getMembers, hasMembers, setMembershipListener, setMembershipService
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.catalina.tribes.ChannelListener
equals, hashCode
-
-
-
-
Method Detail
-
start
public void start(int level) throws java.lang.Exception
- Specified by:
start
in interfaceMembershipProvider
- Overrides:
start
in classCloudMembershipProvider
- Throws:
java.lang.Exception
-
stop
public boolean stop(int level) throws java.lang.Exception
- Specified by:
stop
in interfaceMembershipProvider
- Overrides:
stop
in classCloudMembershipProvider
- Throws:
java.lang.Exception
-
fetchMembers
protected Member[] fetchMembers()
Description copied from class:CloudMembershipProvider
Fetch current cluster members from the cloud orchestration.- Specified by:
fetchMembers
in classCloudMembershipProvider
- Returns:
- the member array
-
parsePods
protected void parsePods(java.io.Reader reader, java.util.List<MemberImpl> members)
-
-