Interface BlockStoreEventListener


  • public interface BlockStoreEventListener
    A listener interface for receiving metadata mutation events of 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.

    • Method Detail

      • onAccessBlock

        void onAccessBlock​(long blockId)
        Actions when accessing a block.
        Parameters:
        blockId - the id of the block to access
      • onAccessBlock

        void onAccessBlock​(long blockId,
                           BlockStoreLocation location)
        Actions when accessing a block.
        Parameters:
        blockId - the id of the block to access
        location - the location of the block
      • onAbortBlock

        void onAbortBlock​(long blockId)
        Actions when aborting a temporary block.
        Parameters:
        blockId - the id of the block where the mutation to abort
      • onCommitBlock

        void onCommitBlock​(long blockId,
                           BlockStoreLocation location)
        Actions when committing a temporary block to a BlockStoreLocation.
        Parameters:
        blockId - the id of the block to commit
        location - the location of the block to be committed
      • onMoveBlockByClient

        void onMoveBlockByClient​(long blockId,
                                 BlockStoreLocation oldLocation,
                                 BlockStoreLocation newLocation)
        Actions when moving a block by a client from a BlockStoreLocation to another.
        Parameters:
        blockId - the id of the block to be moved
        oldLocation - the source location of the block to be moved
        newLocation - the destination location where the block is to be moved to
      • onMoveBlockByWorker

        void onMoveBlockByWorker​(long blockId,
                                 BlockStoreLocation oldLocation,
                                 BlockStoreLocation newLocation)
        Actions when moving a block by a worker from a BlockStoreLocation to another.
        Parameters:
        blockId - the id of the block to be moved
        oldLocation - the source location of the block to be moved
        newLocation - the destination location where the block is to be moved to
      • onRemoveBlockByClient

        void onRemoveBlockByClient​(long blockId)
        Actions when removing an existing block.
        Parameters:
        blockId - the id of the block to be removed
      • onRemoveBlockByWorker

        void onRemoveBlockByWorker​(long blockId)
        Actions when removing an existing block by worker.
        Parameters:
        blockId - the id of the block to be removed
      • onRemoveBlock

        void onRemoveBlock​(long blockId,
                           BlockStoreLocation location)
        Actions when removing an existing block.
        Parameters:
        blockId - the id of the block to be removed
        location - the location of the block to be removed
      • onBlockLost

        void onBlockLost​(long blockId)
        Actions when a block is lost.
        Parameters:
        blockId - the id of the lost block
      • onStorageLost

        void onStorageLost​(java.lang.String tierAlias,
                           java.lang.String dirPath)
        Actions when a storage dir is lost.
        Parameters:
        tierAlias - the tier alias of this storage
        dirPath - the directory path of this storage
      • onStorageLost

        void onStorageLost​(BlockStoreLocation dirLocation)
        Actions when a storage dir is lost.
        Parameters:
        dirLocation - the location of this storage