Class KubernetesLeadershipController
java.lang.Object
org.apache.camel.component.kubernetes.cluster.lock.KubernetesLeadershipController
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.Service
Monitors current status and participate to leader election when no active leaders are present. It communicates
changes in leadership and cluster members to the given event handler.
-
Constructor Summary
ConstructorsConstructorDescriptionKubernetesLeadershipController
(org.apache.camel.CamelContext camelContext, io.fabric8.kubernetes.client.KubernetesClient kubernetesClient, KubernetesLockConfiguration lockConfiguration, KubernetesClusterEventHandler eventHandler) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setDisabled
(boolean disabled) void
start()
void
stop()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.Service
build, close, init
-
Constructor Details
-
KubernetesLeadershipController
public KubernetesLeadershipController(org.apache.camel.CamelContext camelContext, io.fabric8.kubernetes.client.KubernetesClient kubernetesClient, KubernetesLockConfiguration lockConfiguration, KubernetesClusterEventHandler eventHandler)
-
-
Method Details
-
start
public void start()- Specified by:
start
in interfaceorg.apache.camel.Service
-
stop
public void stop()- Specified by:
stop
in interfaceorg.apache.camel.Service
-
isDisabled
public boolean isDisabled() -
setDisabled
public void setDisabled(boolean disabled)
-