Vixen
02b45cc4
csharp
public interface IOdbBackend

Where chunks are kept.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Deliberately dumb. A backend maps an ObjectId to a blob and has no idea what a chunk header is, what compression was used, or what type wrote it — all of that belongs to ObjectDatabase. That is what lets a backend be a directory, a packed file, an HTTP endpoint, or a dictionary, without any of them learning the format.

Content addressing makes Write idempotent: the id is a function of the bytes, so writing the same content twice is writing the same bytes to the same place. A backend is entitled to notice that and do nothing.

Fields and properties (1)

  • bool IsReadOnly

    Whether this backend refuses writes.

Methods (5)

  • bool Exists(ObjectId id)

    Whether a chunk is here.

  • bool TryRead(ObjectId id, out IOdbBlob? blob)

    Reads a chunk.

  • bool Write(ObjectId id, ReadOnlySpan<byte> blob)

    Stores a chunk.

  • bool Delete(ObjectId id)

    Removes a chunk.

  • IEnumerable<ObjectId> Enumerate()

    Every chunk here, in id order.

Used by (13)

  • BundleOdbBackendVixen.Core.Serialization
  • BundleWriterVixen.Core.Serialization
  • FileOdbBackendVixen.Core.Serialization
  • IBundleSourceVixen.Assets
  • LocalBundleSourceVixen.Assets
  • MemoryOdbBackendVixen.Core.Serialization.Tests
  • ObjectDatabaseVixen.Core.Serialization
  • RemoteBundleSourceVixen.Assets
  • RemoteWorldVixen.Assets.Tests
  • RoutedBundleSourceVixen.Assets
  • ContentBuilderVixen.Editor.Assets
  • ProjectVixen.Cli
  • ProjectWorkspaceVixen.Editor.Assets