|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.helidb.impl.AbstractDatabase<K,V,P>
org.helidb.impl.simple.SimpleDatabase<K,V,P>
K
- The type of the keys in the database.V
- The type of the values in the database.P
- The type of positions used by the
DatabaseBackend
to locate records.public class SimpleDatabase<K,V,P>
This is a simple implementation of Database
. It does not
support transactions.
This database implementation is not thread safe. If it is to be used concurrently from several threads, the client must use external synchronization.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
SimpleDatabase(DatabaseBackend<K,V,P> b,
LogAdapterHolder lah)
Create a new database frontend. |
Method Summary | |
---|---|
protected void |
closeBackend()
Subclasses implement this to call close on the backend. |
protected DatabaseBackend<K,V,P> |
getBackendForReading()
Subclasses implement this to return a backend object that can be used for reading data. |
protected DatabaseBackend<K,V,P> |
getBackendForWriting()
Subclasses implement this to return a backend object that can be used for writing data to. |
Methods inherited from class org.helidb.impl.AbstractDatabase |
---|
assertNotClosed, clear, close, compact, containsKey, containsValue, delete, entrySet, equals, fasterInsert, find, find, find, firstRecord, get, getLogAdapterHolder, hashCode, insert, insertOrUpdate, isClosed, isEmpty, iterator, keyIterator, keySet, lastRecord, put, putAll, remove, size, update, valueIterator, values |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleDatabase(DatabaseBackend<K,V,P> b, LogAdapterHolder lah)
b
- The backend.lah
- A log adapter holder.Method Detail |
---|
protected DatabaseBackend<K,V,P> getBackendForReading()
AbstractDatabase
getBackendForReading
in class AbstractDatabase<K,V,P>
protected DatabaseBackend<K,V,P> getBackendForWriting()
AbstractDatabase
getBackendForWriting
in class AbstractDatabase<K,V,P>
protected void closeBackend()
AbstractDatabase
close
on the backend. This is
called by AbstractDatabase.close()
.
closeBackend
in class AbstractDatabase<K,V,P>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |