code: public static void onScheduleHook(String key, Function<Runnable, Runnable> decorator) {
  		synchronized (onScheduleHooks) {
  			onScheduleHooks.put(key, decorator);
  			Function<Runnable, Runnable> newHook = null;
  			for (Function<Runnable, Runnable> function : onScheduleHooks.values()) {
  				if (newHook == null) {
  					newHook = function;
  				}
  				else {
  					newHook = newHook.andThen(function);
  				}
  			}
  			onScheduleHook = newHook;
  		}
  	}
docs: Add or replace a named scheduling {@link Function decorator}. With subsequent calls
  to this method, the onScheduleHook hook can be a composite of several sub-hooks, each
  with a different key.
  <p>
  The sub-hook is a {@link Function} taking the scheduled {@link Runnable}.
  It returns the decorated {@link Runnable}.
  
  @param key the key under which to set up the onScheduleHook sub-hook
  @param decorator the {@link Runnable} decorator to add (or replace, if key is already present)
  @see #resetOnScheduleHook(String)
  @see #resetOnScheduleHooks()