code: public boolean addMasterHook(MasterTriggerRestoreHook<?> hook) {
  		checkNotNull(hook);
  
  		final String id = hook.getIdentifier();
  		checkArgument(!StringUtils.isNullOrWhitespaceOnly(id), "The hook has a null or empty id");
  
  		synchronized (lock) {
  			if (!masterHooks.containsKey(id)) {
  				masterHooks.put(id, hook);
  				return true;
  			}
  			else {
  				return false;
  			}
  		}
  	}
docs: Adds the given master hook to the checkpoint coordinator. This method does nothing, if
  the checkpoint coordinator already contained a hook with the same ID (as defined via
  {@link MasterTriggerRestoreHook#getIdentifier()}).
  
  @param hook The hook to add.
  @return True, if the hook was added, false if the checkpoint coordinator already
  contained a hook with the same ID.