public interface Dao
Modifier and Type | Method and Description |
---|---|
void |
close()
close the connection to the database
|
java.util.Date |
first()
return the date of the first entry
|
DCEntry |
get(int item)
retrieve a single item from the database
|
java.util.Date |
latest()
return the date of the latest entry
|
java.util.concurrent.BlockingQueue<DCEntry> |
query(java.util.Date from,
int queueSize)
retrieve a set of entries in the database;
the result set contains all entries up to the most recent
all retrieved objects are pushed to the blocking queue
|
java.util.concurrent.BlockingQueue<DCEntry> |
query(int from,
int until,
int queueSize)
retrieve a set of entries in the database;
the object denoted with until is not contained in the result set
all retrieved objects are pushed concurrently to a blocking queue
|
int |
size()
get the maximum number of possible DCEntry items in the database
|
int |
writeSurrogates(java.util.concurrent.BlockingQueue<DCEntry> queue,
java.io.File targetdir,
java.lang.String versioninfo,
int maxEntriesInFile) |
int size() throws java.sql.SQLException
java.sql.SQLException
DCEntry get(int item)
item
- java.util.concurrent.BlockingQueue<DCEntry> query(int from, int until, int queueSize)
from
- the first iduntil
- the limit of the last id (the id is not included)queueSize
- the maximum number of entries in the blocing queuejava.util.Date first()
java.util.Date latest()
java.util.concurrent.BlockingQueue<DCEntry> query(java.util.Date from, int queueSize)
from
- int writeSurrogates(java.util.concurrent.BlockingQueue<DCEntry> queue, java.io.File targetdir, java.lang.String versioninfo, int maxEntriesInFile)
void close()