public interface BlockIterator
Modifier and Type | Method and Description |
---|---|
boolean |
aligned(BlockStoreLocation srcLocation,
BlockStoreLocation dstLocation,
BlockOrder order,
java.util.function.Function<Long,Boolean> blockFilterFunc)
Used to detect presence of an overlap between two locations.
|
List<Long> |
getIntersectionList(BlockStoreLocation srcLocation,
BlockOrder srcOrder,
BlockStoreLocation dstLocation,
BlockOrder dstOrder,
int intersectionWidth,
BlockOrder intersectionOrder,
java.util.function.Function<Long,Boolean> blockFilterFunc)
Used to get blocks within an intersection of locations in sorted order.
|
Iterator<Long> |
getIterator(BlockStoreLocation location,
BlockOrder order)
Gets an iterator of block-Ids.
|
List<BlockStoreEventListener> |
getListeners()
Used to acquire and register listeners that are used by this iterator.
|
Pair<List<Long>,List<Long>> |
getSwaps(BlockStoreLocation srcLocation,
BlockOrder srcOrder,
BlockStoreLocation dstLocation,
BlockOrder dstOrder,
int swapRange,
BlockOrder intersectionOrder,
java.util.function.Function<Long,Boolean> blockFilterFunc)
Used to list of blocks, that if swapped, could eliminate overlap between two tiers.
|
Iterator<Long> getIterator(BlockStoreLocation location, BlockOrder order)
location
- location to iterate for blocksorder
- order of blocksList<Long> getIntersectionList(BlockStoreLocation srcLocation, BlockOrder srcOrder, BlockStoreLocation dstLocation, BlockOrder dstOrder, int intersectionWidth, BlockOrder intersectionOrder, java.util.function.Function<Long,Boolean> blockFilterFunc)
srcLocation
- source locationsrcOrder
- order for the source locationdstLocation
- destination locationdstOrder
- order for the destination locationintersectionWidth
- width of intersectionintersectionOrder
- the order of intersected blocksblockFilterFunc
- a filter for blocksPair<List<Long>,List<Long>> getSwaps(BlockStoreLocation srcLocation, BlockOrder srcOrder, BlockStoreLocation dstLocation, BlockOrder dstOrder, int swapRange, BlockOrder intersectionOrder, java.util.function.Function<Long,Boolean> blockFilterFunc)
srcLocation
- source locationsrcOrder
- order for the source locationdstLocation
- destination locationdstOrder
- order for the destination locationswapRange
- per-tier range of swapintersectionOrder
- the order of intersected blocksblockFilterFunc
- a filter for blocksboolean aligned(BlockStoreLocation srcLocation, BlockStoreLocation dstLocation, BlockOrder order, java.util.function.Function<Long,Boolean> blockFilterFunc)
srcLocation
- source locationdstLocation
- destination locationorder
- order of comparison between locationsblockFilterFunc
- a filter for blockstrue
if tiers are alignedList<BlockStoreEventListener> getListeners()
Copyright © 2023. All Rights Reserved.