public class StorageDirEvictorView extends StorageDirView
StorageDir
to provide more limited access for evictors.Constructor and Description |
---|
StorageDirEvictorView(StorageDir dir,
StorageTierEvictorView tierView,
BlockMetadataEvictorView managerView)
Creates a
StorageDirEvictorView using the actual StorageDir
and the associated BlockMetadataEvictorView . |
Modifier and Type | Method and Description |
---|---|
void |
clearBlockMarks()
Clears all marks about blocks to move in/out in this view.
|
long |
getAvailableBytes()
Gets available bytes for this dir.
|
List<BlockMeta> |
getEvictableBlocks()
Gets a filtered list of block metadata, for blocks that are neither pinned or being blocked.
|
long |
getEvitableBytes()
Gets evictable bytes for this dir, i.e., the total bytes of total evictable blocks.
|
boolean |
isMarkedToMoveOut(long blockId)
Returns an indication whether the given block is marked to be moved out.
|
void |
markBlockMoveIn(long blockId,
long blockSize)
Marks a block to move into this dir view, which is used by the evictor.
|
void |
markBlockMoveOut(long blockId,
long blockSize)
Marks a block to move out of this dir view, which is used by the evictor.
|
createTempBlockMeta, getCapacityBytes, getCommittedBytes, getDirViewIndex, getMediumType, getParentTierView, getReservedBytes, toBlockStoreLocation
public StorageDirEvictorView(StorageDir dir, StorageTierEvictorView tierView, BlockMetadataEvictorView managerView)
StorageDirEvictorView
using the actual StorageDir
and the associated BlockMetadataEvictorView
.dir
- which the dirView is constructed fromtierView
- which the dirView is undermanagerView
- which the dirView is associated withpublic long getAvailableBytes()
StorageDirView
getAvailableBytes
in class StorageDirView
public List<BlockMeta> getEvictableBlocks()
public long getEvitableBytes()
public void clearBlockMarks()
public boolean isMarkedToMoveOut(long blockId)
blockId
- the block IDpublic void markBlockMoveIn(long blockId, long blockSize)
blockId
- the Id of the blockblockSize
- the block sizepublic void markBlockMoveOut(long blockId, long blockSize)
blockId
- the Id of the blockblockSize
- the block sizeCopyright © 2023. All Rights Reserved.