public final class DefaultBlockDeletionContext extends Object implements BlockDeletionContext
BlockDeletionContext.BlockDeletionListener
Constructor and Description |
---|
DefaultBlockDeletionContext(BlockDeletionContext.BlockDeletionListener... listeners) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
registerBlockForDeletion(long blockId) |
void |
registerBlocksForDeletion(Collection<Long> blockIds) |
public DefaultBlockDeletionContext(BlockDeletionContext.BlockDeletionListener... listeners)
listeners
- listeners to call for each deleted block when the context is closedpublic void registerBlocksForDeletion(Collection<Long> blockIds)
registerBlocksForDeletion
in interface BlockDeletionContext
blockIds
- the blocks to be deleted when the context closespublic void registerBlockForDeletion(long blockId)
registerBlockForDeletion
in interface BlockDeletionContext
blockId
- the block to be deleted when the context closespublic void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2023. All Rights Reserved.