IFdbLayer

Namespace: FoundationDB.Client · interface

Represents a FoundationDB Layer that uses a metadata cache to speed up operations inside transactions

Remarks

A typical Layer will be a thin wrapper over a subspace location and some options/encoders/helpers

When a transaction wants to interact with the Layer, is must first call Resolve(...) at least once within the transaction, and then call any method necessary on that state object.

Storing and reusing state instances outside the transaction is NOT ALLOWED.

The Layer implementation should try to cache complex metadata in order to reduce the latency.

If the layer uses lower level layers, it should NOT attempt to cache these in its own state, and instead call these layer's own Resolve methods

This means that layers should not cache the TState type itself, and instead cache a "TCache" object, and create a new "TState" instance for each new transaction, that wraps the TCache

Properties

Name

string Name { get; }

Friendly name of the layer

For logging/debugging purpose