code: @Override
      public void isLeader() {
          LOG.warn("Server instance with server id {} is elected as leader", serverId);
          serviceState.becomingActive();
          try {
              for (ActiveStateChangeHandler handler : activeStateChangeHandlers) {
                  handler.instanceIsActive();
              }
              activeInstanceState.update(serverId);
              serviceState.setActive();
          } catch (Exception e) {
              LOG.error("Got exception while activating", e);
              notLeader();
              rejoinElection();
          }
      }
docs: Call all registered {@link ActiveStateChangeHandler}s on being elected active.
  
  In addition, shared state information about this instance becoming active is updated
  using {@link ActiveInstanceState}.