@ThreadSafe public class BlockTransferInfo extends Object
Modifier and Type | Method and Description |
---|---|
static BlockTransferInfo |
createMove(BlockStoreLocation srcLocation,
long srcBlockId,
BlockStoreLocation dstLocation)
Creates a new instance of
BlockTransferInfo for moving a block. |
static BlockTransferInfo |
createSwap(BlockStoreLocation srcLocation,
long srcBlockId,
BlockStoreLocation dstLocation,
long dstBlockId)
Creates a new instance of
BlockTransferInfo for swapping two blocks. |
long |
getDstBlockId() |
BlockStoreLocation |
getDstLocation() |
long |
getSrcBlockId() |
BlockStoreLocation |
getSrcLocation() |
boolean |
isSwap() |
String |
toString() |
public static BlockTransferInfo createMove(BlockStoreLocation srcLocation, long srcBlockId, BlockStoreLocation dstLocation)
BlockTransferInfo
for moving a block.srcLocation
- the source BlockStoreLocation
srcBlockId
- the source block iddstLocation
- the destination BlockStoreLocation
public static BlockTransferInfo createSwap(BlockStoreLocation srcLocation, long srcBlockId, BlockStoreLocation dstLocation, long dstBlockId)
BlockTransferInfo
for swapping two blocks.srcLocation
- the source BlockStoreLocation
srcBlockId
- the source block iddstLocation
- the destination BlockStoreLocation
dstBlockId
- the destination block idpublic long getSrcBlockId()
public long getDstBlockId()
public boolean isSwap()
true
if this tranfer info is for a swap operationpublic BlockStoreLocation getSrcLocation()
BlockStoreLocation
public BlockStoreLocation getDstLocation()
BlockStoreLocation
Copyright © 2023. All Rights Reserved.