net.named_data.jndn.encrypt
public class Sqlite3ProducerDb extends Sqlite3ProducerDbBase
ProducerDb.Error
DELETE_deleteContentKey, INITIALIZATION1, INITIALIZATION2, INSERT_addContentKey, SELECT_getContentKey, SELECT_hasContentKey
Constructor and Description |
---|
Sqlite3ProducerDb(String databaseFilePath)
Create an Sqlite3ProducerDb to use the given SQLite3 file.
|
Modifier and Type | Method and Description |
---|---|
void |
addContentKey(double timeSlot,
Blob key)
Add key as the content key for the hour covering timeSlot.
|
void |
deleteContentKey(double timeSlot)
Delete the content key for the hour covering timeSlot.
|
Blob |
getContentKey(double timeSlot)
Get the content key for the hour covering timeSlot.
|
boolean |
hasContentKey(double timeSlot)
Check if a content key exists for the hour covering timeSlot.
|
getFixedTimeSlot
public Sqlite3ProducerDb(String databaseFilePath) throws ProducerDb.Error
databaseFilePath
- The path of the SQLite file.ProducerDb.Error
- for a database error.public boolean hasContentKey(double timeSlot) throws ProducerDb.Error
hasContentKey
in class ProducerDb
timeSlot
- The time slot as milliseconds since Jan 1, 1970 UTC.ProducerDb.Error
- for a database error.public Blob getContentKey(double timeSlot) throws ProducerDb.Error
getContentKey
in class ProducerDb
timeSlot
- The time slot as milliseconds since Jan 1, 1970 UTC.ProducerDb.Error
- if there is no key covering timeSlot or other
database error.public void addContentKey(double timeSlot, Blob key) throws ProducerDb.Error
addContentKey
in class ProducerDb
timeSlot
- The time slot as milliseconds since Jan 1, 1970 UTC.key
- The encoded key.ProducerDb.Error
- if a key for the same hour already exists in the
database, or other database error.public void deleteContentKey(double timeSlot) throws ProducerDb.Error
deleteContentKey
in class ProducerDb
timeSlot
- The time slot as milliseconds since Jan 1, 1970 UTC.ProducerDb.Error
- for a database error.Copyright © 2016. All rights reserved.