org.helidb.backend.heap
Class HeapBackendFactory<K,V>
java.lang.Object
org.helidb.backend.heap.HeapBackendFactory<K,V>
- Type Parameters:
K - The type of the keys in the database.V - The type of the values in the database.
- All Implemented Interfaces:
- DatabaseBackendFactory<K,V,Long>
public class HeapBackendFactory<K,V>
- extends Object
- implements DatabaseBackendFactory<K,V,Long>
This is a DatabaseBackendFactory for creating HeapBackend
objects. objects.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- In_jar:
- helidb-core
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeapBackendFactory
public HeapBackendFactory(Serializer<K> keySerializer,
Serializer<V> valueSerializer,
LogAdapterHolder lah)
throws NullPointerException
- Create a new factory.
- Parameters:
keySerializer - The key serializer. This instance will be reused by
all backend objects created by this factory.valueSerializer - The value serializer. This instance will be reused
by all backend object created by this factory.lah - A log adapter holder.
- Throws:
NullPointerException - If any of the parameters is null.
create
public HeapBackend<K,V> create(DatabaseFiles f,
boolean readOnly)
- Description copied from interface:
DatabaseBackendFactory
- Create a new backend for the supplied file.
- Specified by:
create in interface DatabaseBackendFactory<K,V,Long>
- 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.