Interface Access

All Known Implementing Classes:
AbstractAccess, Fork, Prefixed, RoErasedAccess, Snapshot

public interface Access
Provides access to Exonum MerkleDB indexes. An access object corresponds to a certain database state.

An access can be read-only or read-write. Read-only accesses produce indexes that forbid modifying operations.

The changes made to read-write accesses are not usually applied immediately to the database state, but are performed separately. For example, Exonum will apply the changes made by all transactions when a block is confirmed.

Accesses may perform index address resolution: they may modify the passed index address before fetching it from the database. That implies that addresses passed to index factory methods are relative to an access object. The address resolution rules must be documented in interface implementations.

As each Access object requires some MerkleDB resources to function, they work in a scope that is usually managed by the framework. When an Access is closed, all indexes created with it are destroyed and become inaccessible; and no new indexes can be created.

All method arguments are non-null by default.


This Java interface is similar to a combination of Rust Access and AccessExt traits.

See Also:
com.exonum.binding.core.storage.indices, StandardSerializers