public interface BlockStoreEventListener
BlockStore
. All the
callback methods are triggered only after the actual event has been completed successfully.
All methods may be called concurrently, thus listener implementation needs to ensure thread-safety.
Modifier and Type | Method and Description |
---|---|
void |
onAbortBlock(long sessionId,
long blockId)
Actions when aborting a temporary block.
|
void |
onAccessBlock(long sessionId,
long blockId)
Actions when accessing a block.
|
void |
onAccessBlock(long sessionId,
long blockId,
BlockStoreLocation location)
Actions when accessing a block.
|
void |
onBlockLost(long blockId)
Actions when a block is lost.
|
void |
onCommitBlock(long sessionId,
long blockId,
BlockStoreLocation location)
Actions when committing a temporary block to a
BlockStoreLocation . |
void |
onMoveBlockByClient(long sessionId,
long blockId,
BlockStoreLocation oldLocation,
BlockStoreLocation newLocation)
Actions when moving a block by a client from a
BlockStoreLocation to another. |
void |
onMoveBlockByWorker(long sessionId,
long blockId,
BlockStoreLocation oldLocation,
BlockStoreLocation newLocation)
Actions when moving a block by a worker from a
BlockStoreLocation to another. |
void |
onRemoveBlock(long sessionId,
long blockId,
BlockStoreLocation location)
Actions when removing an existing block.
|
void |
onRemoveBlockByClient(long sessionId,
long blockId)
Actions when removing an existing block.
|
void |
onRemoveBlockByWorker(long sessionId,
long blockId)
Actions when removing an existing block by worker.
|
void |
onStorageLost(BlockStoreLocation dirLocation)
Actions when a storage dir is lost.
|
void |
onStorageLost(String tierAlias,
String dirPath)
Actions when a storage dir is lost.
|
void onAccessBlock(long sessionId, long blockId)
sessionId
- the id of the session to access this blockblockId
- the id of the block to accessvoid onAccessBlock(long sessionId, long blockId, BlockStoreLocation location)
sessionId
- the id of the session to access this blockblockId
- the id of the block to accesslocation
- the location of the blockvoid onAbortBlock(long sessionId, long blockId)
sessionId
- the id of the session to abort on this blockblockId
- the id of the block where the mutation to abortvoid onCommitBlock(long sessionId, long blockId, BlockStoreLocation location)
BlockStoreLocation
.sessionId
- the id of the session to commit to this blockblockId
- the id of the block to commitlocation
- the location of the block to be committedvoid onMoveBlockByClient(long sessionId, long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
BlockStoreLocation
to another.sessionId
- the id of the session to move this blockblockId
- the id of the block to be movedoldLocation
- the source location of the block to be movednewLocation
- the destination location where the block is to be moved tovoid onMoveBlockByWorker(long sessionId, long blockId, BlockStoreLocation oldLocation, BlockStoreLocation newLocation)
BlockStoreLocation
to another.sessionId
- the id of the session to move this blockblockId
- the id of the block to be movedoldLocation
- the source location of the block to be movednewLocation
- the destination location where the block is to be moved tovoid onRemoveBlockByClient(long sessionId, long blockId)
sessionId
- the id of the session to remove this blockblockId
- the id of the block to be removedvoid onRemoveBlockByWorker(long sessionId, long blockId)
sessionId
- the id of the session to remove this blockblockId
- the id of the block to be removedvoid onRemoveBlock(long sessionId, long blockId, BlockStoreLocation location)
sessionId
- the id of the session to remove this blockblockId
- the id of the block to be removedlocation
- the location of the block to be removedvoid onBlockLost(long blockId)
blockId
- the id of the lost blockvoid onStorageLost(String tierAlias, String dirPath)
tierAlias
- the tier alias of this storagedirPath
- the directory path of this storagevoid onStorageLost(BlockStoreLocation dirLocation)
dirLocation
- the location of this storageCopyright © 2022. All Rights Reserved.