code: private void checkTempBlockIdAvailable(long blockId) throws BlockAlreadyExistsException {
      if (mMetaManager.hasTempBlockMeta(blockId)) {
        throw new BlockAlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_EXISTS, blockId);
      }
      if (mMetaManager.hasBlockMeta(blockId)) {
        throw new BlockAlreadyExistsException(ExceptionMessage.TEMP_BLOCK_ID_COMMITTED, blockId);
      }
    }
docs: Checks if a block id is available for a new temp block. This method must be enclosed by
  {@link #mMetadataLock}.
  
  @param blockId the id of block
  @throws BlockAlreadyExistsException if block id already exists