swh.objstorage.backends.winery.pools.shard module#

class swh.objstorage.backends.winery.pools.shard.ShardBackedPool(base_directory: Path, pool_name: str, shard_max_size: int)[source]#

Bases: FileBackedPool

swh-shard files-backed pool for Winery.

image_open(image: str) ImageReader[source]#
delete_object(shard_name: str, obj_id: bytes) None[source]#
open_writer(shard_name: str, nb_objects: int, create_image: bool) ImageWriter[source]#

Instantiate the correct ImageWriter object for the given shard

This is used at time of packing a batch of objects in a shard file.