Class RootBlockAllocator
java.lang.Object
org.rostore.v2.media.block.allocator.RootBlockAllocator
Major allocator for the
Media
. All Block
allocations
should happen over this instance.
The instance is responsible for accounting of all blocks and
manages a table (base don CatalogBlockOperations
) that register
all free blocks-
To accelerate operation the CachedCatalogBlockOperations
is used,
that holds specified list of blocks ready for allocation, effectively
taking them from the pool of free blocks.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BlockAllocator
Creates a new root block allocator.static BlockAllocator
-
Constructor Details
-
RootBlockAllocator
public RootBlockAllocator()
-
-
Method Details
-
create
Creates a new root block allocator.This operation should only be executed once.
- Parameters:
media
- the media the root allocator is created in.- Returns:
-
load
-