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

class swh.objstorage.backends.winery.pools.shard.Shard(self: swh.shard._shard.ShardReader, path: str)[source]#

Bases: Shard

Instantiate a ShardReader object

Parameters:

path – the filename of the shard to read

class swh.objstorage.backends.winery.pools.shard.ShardBackedPool(base_directory: Path, pool_name: str, shard_max_size: int, use_permissions: bool = True)[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.