DatastoreRegistryBridgeManager¶
- class lsst.daf.butler.registry.interfaces.DatastoreRegistryBridgeManager(*, opaque: OpaqueTableStorageManager, universe: DimensionUniverse, registry_schema_version: VersionTuple | None = None)¶
Bases:
VersionedExtensionAn abstract base class that defines the interface between
RegistryandDatastorewhen a newDatastoreis constructed.- Parameters:
- opaque
OpaqueTableStorageManager Manager object for opaque table storage in the
Registry.- universe
DimensionUniverse All dimensions know to the
Registry.- registry_schema_version
VersionTupleorNone, optional Version of registry schema.
- opaque
Notes
Datastores are passed an instance of
DatastoreRegistryBridgeManagerat construction, and should use it to obtain and keep any of the following:a
DatastoreRegistryBridgeinstance to record in theRegistrywhat is present in the datastore (needed by all datastores that are not just forwarders);one or more
OpaqueTableStorageinstance if they wish to store internal records in theRegistrydatabase;the
DimensionUniverse, if they need it to (e.g.) construct or validate filename templates.
Methods Summary
clone(*, db, opaque)Make an independent copy of this manager instance bound to new instances of
Databaseand other managers.findDatastores(ref)Retrieve datastore locations for a given dataset.
initialize(db, context, *, opaque, datasets, ...)Construct an instance of the manager.
refresh()Ensure all other operations on this manager are aware of any collections that may have been registered by other clients since it was initialized or last refreshed.
register(name, *[, ephemeral])Register a new
Datastoreassociated with thisRegistry.Methods Documentation
- abstract clone(*, db: Database, opaque: OpaqueTableStorageManager) DatastoreRegistryBridgeManager¶
Make an independent copy of this manager instance bound to new instances of
Databaseand other managers.- Parameters:
- db
Database New
Databaseobject to use when instantiating the manager.- opaque
OpaqueTableStorageManager New
OpaqueTableStorageManagerobject to use when instantiating the manager.
- db
- Returns:
- instance
DatastoreRegistryBridgeManager New manager instance with the same configuration as this instance, but bound to a new Database object.
- instance
- abstract findDatastores(ref: DatasetRef | FakeDatasetRef) Iterable[str]¶
Retrieve datastore locations for a given dataset.
- abstract classmethod initialize(db: Database, context: StaticTablesContext, *, opaque: OpaqueTableStorageManager, datasets: type[DatasetRecordStorageManager], universe: DimensionUniverse, registry_schema_version: VersionTuple | None = None) DatastoreRegistryBridgeManager¶
Construct an instance of the manager.
- Parameters:
- db
Database Interface to the underlying database engine and namespace.
- context
StaticTablesContext Context object obtained from
Database.declareStaticTables; used to declare any tables that should always be present in a layer implemented with this manager.- opaque
OpaqueTableStorageManager Registry manager object for opaque (to Registry) tables, provided to allow Datastores to store their internal information inside the Registry database.
- datasetssubclass of
DatasetRecordStorageManager Concrete class that will be used to manage the core dataset tables in this registry; should be used only to create foreign keys to those tables.
- universe
DimensionUniverse All dimensions known to the registry.
- registry_schema_version
VersionTupleorNone Schema version of this extension as defined in registry.
- db
- Returns:
- manager
DatastoreRegistryBridgeManager An instance of a concrete
DatastoreRegistryBridgeManagersubclass.
- manager
- abstract refresh() None¶
Ensure all other operations on this manager are aware of any collections that may have been registered by other clients since it was initialized or last refreshed.
- abstract register(name: str, *, ephemeral: bool = True) DatastoreRegistryBridge¶
Register a new
Datastoreassociated with thisRegistry.This method should be called by all
Datastoreclasses aside from those that only forward storage to other datastores.- Parameters:
- Returns:
- bridge
DatastoreRegistryBridge Object that provides the interface this
Datastoreshould use to communicate with theRegistry.
- bridge