org.helidb.backend
Interface DatabaseBackendFactory<K,V,P>
- Type Parameters:
K
- The type of the keys in the database.V
- The type of the values in the database.P
- The type of positions in the database.
- All Known Implementing Classes:
- BPlusTreeIndexBackendFactory, ConstantRecordSizeBPlusTreeBackendFactory, ConstantRecordSizeHeapBackendFactory, HeapBackendFactory, LruCacheBackendFactory
public interface DatabaseBackendFactory<K,V,P>
This interface defines a factory for database backend objects. Some database
implementations, for instance the shadow copy transactional database, use
backend factories to create new backend objects when they need to.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
ShadowCopyTransactionalDatabase
- In_jar:
- helidb-core
create
DatabaseBackend<K,V,P> create(DatabaseFiles f,
boolean readOnly)
- Create a new backend for the supplied file.
- Parameters:
f
- The file(s) containing the database data. The implementation of
this method should be able to assume a specific DatabaseFiles
implementation. Which depends on the implementation of the database
backend to create.readOnly
- Should the backend object be created read only?
- Returns:
- A new database backend object.