code: public Optional<MirroringService> mirroringService() {
          if (pluginsForLeaderOnly == null) {
              return Optional.empty();
          }
          return pluginsForLeaderOnly.findFirstPlugin(DefaultMirroringServicePlugin.class)
                                     .map(DefaultMirroringServicePlugin::mirroringService);
      }
docs: Returns the {@link MirroringService} of the server.
  
  @return the {@link MirroringService} if the server is started and mirroring is enabled.
  {@link Optional#empty()} otherwise.