question: starts waiting for leadership . should only be called once throughout the life of the program . concode_field_sep boolean leading concode_elem_sep ResourceManagementScheduler resourceManagementScheduler concode_elem_sep EmittingLogger log concode_elem_sep LeaderSelector leaderSelector concode_elem_sep TaskActionClientFactory taskActionClientFactory concode_elem_sep AtomicReference<Lifecycle> leaderLifecycleRef concode_elem_sep ReentrantLock giant concode_elem_sep Condition mayBeStopped concode_elem_sep TaskRunner taskRunner concode_elem_sep TaskQueue taskQueue concode_field_sep String getLeader concode_elem_sep Optional<TaskRunner> getTaskRunner concode_elem_sep void stop concode_elem_sep Optional<TaskQueue> getTaskQueue concode_elem_sep void stopLeading concode_elem_sep Optional<ResourceManagementScheduler> getResourceManagementScheduler concode_elem_sep Optional<TaskActionClient> getTaskActionClient concode_elem_sep boolean isLeading
target: void function ( ) { giant . lock ( ) ; try { leaderSelector . start ( ) ; } finally { giant . unlock ( ) ; } }