@Test public void getTempBlockMetaNotExisting() throws Exception { mThrown.expect(BlockDoesNotExistException.class); mThrown.expectMessage(ExceptionMessage.BLOCK_META_NOT_FOUND.getMessage(TEST_TEMP_BLOCK_ID)); mDir.getBlockMeta(TEST_TEMP_BLOCK_ID); }
public BlockMeta getBlockMeta(long blockId) throws BlockDoesNotExistException { BlockMeta blockMeta = mBlockIdToBlockMap.get(blockId); if (blockMeta == null) { throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } return blockMeta; }
StorageDir { public BlockMeta getBlockMeta(long blockId) throws BlockDoesNotExistException { BlockMeta blockMeta = mBlockIdToBlockMap.get(blockId); if (blockMeta == null) { throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } return blockMeta; } }
StorageDir { public BlockMeta getBlockMeta(long blockId) throws BlockDoesNotExistException { BlockMeta blockMeta = mBlockIdToBlockMap.get(blockId); if (blockMeta == null) { throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } return blockMeta; } private  StorageDir(StorageTier tier, int dirIndex, long capacityBytes, long reservedBytes,
      String dirPath, String dirMedium); }
StorageDir { public BlockMeta getBlockMeta(long blockId) throws BlockDoesNotExistException { BlockMeta blockMeta = mBlockIdToBlockMap.get(blockId); if (blockMeta == null) { throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } return blockMeta; } private  StorageDir(StorageTier tier, int dirIndex, long capacityBytes, long reservedBytes,
      String dirPath, String dirMedium); static StorageDir newStorageDir(StorageTier tier, int dirIndex, long capacityBytes,
      long reservedBytes, String dirPath, String dirMedium); long getCapacityBytes(); long getAvailableBytes(); long getCommittedBytes(); String getDirPath(); String getDirMedium(); StorageTier getParentTier(); int getDirIndex(); List<Long> getBlockIds(); List<BlockMeta> getBlocks(); boolean hasBlockMeta(long blockId); boolean hasTempBlockMeta(long blockId); BlockMeta getBlockMeta(long blockId); TempBlockMeta getTempBlockMeta(long blockId); void addBlockMeta(BlockMeta blockMeta); void addTempBlockMeta(TempBlockMeta tempBlockMeta); void removeBlockMeta(BlockMeta blockMeta); void removeTempBlockMeta(TempBlockMeta tempBlockMeta); void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize); void cleanupSessionTempBlocks(long sessionId, List<Long> tempBlockIds); List<TempBlockMeta> getSessionTempBlocks(long sessionId); BlockStoreLocation toBlockStoreLocation(); long getReservedBytes(); }
StorageDir { public BlockMeta getBlockMeta(long blockId) throws BlockDoesNotExistException { BlockMeta blockMeta = mBlockIdToBlockMap.get(blockId); if (blockMeta == null) { throw new BlockDoesNotExistException(ExceptionMessage.BLOCK_META_NOT_FOUND, blockId); } return blockMeta; } private  StorageDir(StorageTier tier, int dirIndex, long capacityBytes, long reservedBytes,
      String dirPath, String dirMedium); static StorageDir newStorageDir(StorageTier tier, int dirIndex, long capacityBytes,
      long reservedBytes, String dirPath, String dirMedium); long getCapacityBytes(); long getAvailableBytes(); long getCommittedBytes(); String getDirPath(); String getDirMedium(); StorageTier getParentTier(); int getDirIndex(); List<Long> getBlockIds(); List<BlockMeta> getBlocks(); boolean hasBlockMeta(long blockId); boolean hasTempBlockMeta(long blockId); BlockMeta getBlockMeta(long blockId); TempBlockMeta getTempBlockMeta(long blockId); void addBlockMeta(BlockMeta blockMeta); void addTempBlockMeta(TempBlockMeta tempBlockMeta); void removeBlockMeta(BlockMeta blockMeta); void removeTempBlockMeta(TempBlockMeta tempBlockMeta); void resizeTempBlockMeta(TempBlockMeta tempBlockMeta, long newSize); void cleanupSessionTempBlocks(long sessionId, List<Long> tempBlockIds); List<TempBlockMeta> getSessionTempBlocks(long sessionId); BlockStoreLocation toBlockStoreLocation(); long getReservedBytes();  }