public interface LeaderDecider
Modifier and Type | Field and Description |
---|---|
static String |
METRIC_OPERATION_LEADER_DECIDER |
static String |
METRIC_OPERATION_LEADER_DECIDER_IS_LEADER |
Modifier and Type | Method and Description |
---|---|
default void |
initialize()
Performs initialization tasks for decider if any.
|
Boolean |
isLeader(String workerId)
Method invoked to check the given workerId corresponds to one of the workers
designated to execute shard-syncs periodically.
|
default void |
releaseLeadershipIfHeld()
If the current worker is the leader, then releases the leadership else does nothing.
|
void |
shutdown()
Can be invoked, if needed, to shutdown any clients/thread-pools
being used in the LeaderDecider implementation.
|
static final String METRIC_OPERATION_LEADER_DECIDER
static final String METRIC_OPERATION_LEADER_DECIDER_IS_LEADER
Boolean isLeader(String workerId)
workerId
- ID of the workervoid shutdown()
default void initialize()
default void releaseLeadershipIfHeld()
Copyright © 2025. All rights reserved.