org.helidb.backend.heapcrs
Class ConstantRecordSizeHeapBackendFactory<K,V>
java.lang.Object
org.helidb.backend.heapcrs.ConstantRecordSizeHeapBackendFactory<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 ConstantRecordSizeHeapBackendFactory<K,V>
- extends Object
- implements DatabaseBackendFactory<K,V,Long>
This is a DatabaseBackendFactory for creating
ConstantRecordSizeHeapBackend objects.
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
ConstantRecordSizeHeapBackend- In_jar:
- helidb-core
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConstantRecordSizeHeapBackendFactory
public ConstantRecordSizeHeapBackendFactory(Serializer<K> keySerializer,
Serializer<V> valueSerializer,
long startPosOfDb,
int tmpBufferSize,
LogAdapterHolder lah)
throws IllegalArgumentException,
NullPointerException
- Create a new backend factory for
ConstantRecordSizeHeapBackend
objects.
- Parameters:
keySerializer - The serializer used for serializing keys. This
instance is reused for all created backends.valueSerializer - The serializer used for serializing values. This
instance is reused for all created backends.startPosOfDb - The start position of the database in the database
files.tmpBufferSize - The size of temporary in-memory buffers used by the
database.lah - A log adapter holder.
- Throws:
IllegalArgumentException - If startPosOfDb or valueSize is negative or if keySize is less than one byte.
NullPointerException
create
public ConstantRecordSizeHeapBackend<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.