@NotThreadSafe public final class RoundRobinAllocator extends Object implements Allocator
Allocator.Factory
Constructor and Description |
---|
RoundRobinAllocator(BlockMetadataView view)
Creates a new instance of
RoundRobinAllocator . |
Modifier and Type | Method and Description |
---|---|
StorageDirView |
allocateBlockWithView(long sessionId,
long blockSize,
BlockStoreLocation location,
BlockMetadataView metadataView)
Allocates a block from the given block store location under a given view.
|
public RoundRobinAllocator(BlockMetadataView view)
RoundRobinAllocator
.view
- BlockMetadataView
to pass to the allocatorpublic StorageDirView allocateBlockWithView(long sessionId, long blockSize, BlockStoreLocation location, BlockMetadataView metadataView)
Allocator
BlockStoreLocation.anyTier()
or
BlockStoreLocation.anyDirInTier(String)
.allocateBlockWithView
in interface Allocator
sessionId
- the id of session to apply for the block allocationblockSize
- the size of block in byteslocation
- the location in block storemetadataView
- of the block metadataStorageDirView
in which to create the temp block meta if success, null
otherwiseCopyright © 2023. All Rights Reserved.