Class TimedLeaderNotifier
- java.lang.Object
-
- org.apache.camel.component.kubernetes.cluster.lock.TimedLeaderNotifier
-
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.Service
public class TimedLeaderNotifier extends Object implements org.apache.camel.Service
Receives information about the current leader and handles expiration automatically.
-
-
Constructor Summary
Constructors Constructor Description TimedLeaderNotifier(org.apache.camel.CamelContext camelContext, KubernetesClusterEventHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
refreshLeadership(Optional<String> leader, Long timestamp, Long lease, Set<String> members)
void
start()
void
stop()
-
-
-
Constructor Detail
-
TimedLeaderNotifier
public TimedLeaderNotifier(org.apache.camel.CamelContext camelContext, KubernetesClusterEventHandler handler)
-
-
Method Detail
-
refreshLeadership
public void refreshLeadership(Optional<String> leader, Long timestamp, Long lease, Set<String> members)
-
start
public void start()
- Specified by:
start
in interfaceorg.apache.camel.Service
-
stop
public void stop()
- Specified by:
stop
in interfaceorg.apache.camel.Service
-
-