code: static ScheduledExecutorService renamingDecorator(final ScheduledExecutorService service,
        final Supplier<String> nameSupplier) {
      checkNotNull(service);
      checkNotNull(nameSupplier);
      if (isAppEngine()) {
        // AppEngine doesn't support thread renaming, so don't even try.
        return service;
      }
      return new WrappingScheduledExecutorService(service) {
        @Override protected <T> Callable<T> wrapTask(Callable<T> callable) {
          return Callables.threadRenaming(callable, nameSupplier);
        }
        @Override protected Runnable wrapTask(Runnable command) {
          return Callables.threadRenaming(command, nameSupplier);
        }
      };
    }
docs: Creates a {@link ScheduledExecutorService} that renames the {@link Thread threads} that its
  tasks run in.
  
  <p>The names are retrieved from the {@code nameSupplier} on the thread that is being renamed
  right before each task is run.  The renaming is best effort, if a {@link SecurityManager}
  prevents the renaming then it will be skipped but the tasks will still execute.
  
  
  @param service The executor to decorate
  @param nameSupplier The source of names for each task