AssetLocationRepository class abstract interface

Stores AssetLocation placement records — which provider holds which asset's bytes.

This is the index the hub consults on every download to pick a provider, and the one a replication pass reconciles against.

Implementers

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

byAsset(String assetId) Future<List<AssetLocation>>
Every placement of assetId, best-first is not implied — the caller selects among them.
byAssetAndProvider(String assetId, String providerId) Future<AssetLocation?>
The placement of assetId on providerId, or null.
byOrganization(String organizationId) Future<List<AssetLocation>>
Every placement belonging to organizationId.
byProvider(String providerId) Future<List<AssetLocation>>
Every placement held by providerId.
delete(String id) Future<bool>
Deletes the placement with id. Returns whether one was removed.
deleteByAsset(String assetId) Future<int>
Deletes every placement of assetId, returning how many were removed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
save(AssetLocation location) Future<void>
Inserts or replaces location, keyed by its id.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited