Storage

public interface Storage<I, M extends Message, R extends ReadRequest<I>> implements AutoCloseable

The base interface for storages.

Parameters

<I>

the type of identifiers

<M>

the type of records

<R>

the type of read requests

Inheritors

Functions

Link copied to clipboard
public abstract void close()
Closes the storage.
Link copied to clipboard
public abstract Iterator<I> index()
Returns an iterator over identifiers of records in the storage.
Link copied to clipboard
public abstract boolean isMultitenant()
Verifies whether the storage is multitenant.
Link copied to clipboard
public abstract boolean isOpen()
Verifies whether the storage is open.
Link copied to clipboard
public abstract Optional<M> read(R request)
Reads a record from the storage by the specified request.
Link copied to clipboard
public abstract void write(I id, M record)
Writes a record into the storage.