public class BlockTransferExecutor extends Object
BlockTransferInfo
orders concurrently.Constructor and Description |
---|
BlockTransferExecutor(ExecutorService executor,
BlockStore blockStore,
StoreLoadTracker loadTracker,
int concurrencyLimit)
Creates a new instance for executing block transfers.
|
Modifier and Type | Method and Description |
---|---|
BlockOperationResult |
executeTransferList(List<BlockTransferInfo> transferInfos)
Executes given list of
BlockTransferInfo s. |
BlockOperationResult |
executeTransferList(List<BlockTransferInfo> transferInfos,
java.util.function.Consumer<Exception> exceptionHandler)
Executes given list of
BlockTransferInfo s. |
public BlockTransferExecutor(ExecutorService executor, BlockStore blockStore, StoreLoadTracker loadTracker, int concurrencyLimit)
executor
- the executor to useblockStore
- the block storeloadTracker
- the load trackerconcurrencyLimit
- the max concurrent transferspublic BlockOperationResult executeTransferList(List<BlockTransferInfo> transferInfos)
BlockTransferInfo
s.transferInfos
- the list of transferspublic BlockOperationResult executeTransferList(List<BlockTransferInfo> transferInfos, java.util.function.Consumer<Exception> exceptionHandler)
BlockTransferInfo
s.transferInfos
- the list of transfersexceptionHandler
- exception handler for when a transfer failsCopyright © 2023. All Rights Reserved.