code: public void addMasterState(MasterState state) {
  		checkNotNull(state);
  
  		synchronized (lock) {
  			if (!discarded) {
  				masterState.add(state);
  			}
  		}
  	}
docs: Adds a master state (state generated on the checkpoint coordinator) to
  the pending checkpoint.
  
  @param state The state to add