|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eurotech.framework.core.data.store.DbDataStore
public class DbDataStore
An implementation of the DataStore which stores messages into an embedded HSQLDB instance. FIXME: reset identity (see below, not working) on sequence limit exceed exception.
Constructor Summary | |
---|---|
DbDataStore()
|
Method Summary | |
---|---|
List<DataMessage> |
allDroppedInFlightMessagesNoPayload()
Finds the list of all published messages that will not be confirmed and returns them WITHOUT loading the payload. |
List<DataMessage> |
allInFlightMessagesNoPayload()
Finds the list of all published but not yet confirmed messages and returns them WITHOUT loading the payload. |
List<DataMessage> |
allUnpublishedMessagesNoPayload()
Finds the list of all unpublished messages and returns them WITHOUT loading the payload. |
void |
checkpoint()
Performs a checkpoint of the store. |
void |
confirmed(int msgId)
Acknowledges the delivery of the DataMessage published with the given protocol (e.g. |
void |
defrag()
Defragments the store. |
void |
deleteStaleMessages(int purgeAge)
Deletes stale messages. |
void |
dropAllInFlightMessages()
Drops all in-flight messages. |
DataMessage |
get(int msgId)
Returns a message from the DataStore by its message id. |
DataMessage |
getNextMessage()
Gets the next unpublished message. |
void |
published(int msgId)
Acknowledges the publication of the DataMessage with the given ID. |
void |
published(int msgId,
int publishedMsgId,
String sessionId)
Acknowledges the publication of the DataMessage with the given ID associating it to the protocol (e.g. |
void |
start(DbService dbService,
int houseKeeperInterval,
int purgeAge,
int capacity)
|
void |
stop()
|
DataMessage |
store(String topic,
byte[] payload,
int qos,
boolean retain,
int priority)
Stores an MQTT message for deferred publication. |
void |
unpublishAllInFlighMessages()
Marks all in-flight messages as unpublished. |
void |
update(int houseKeeperInterval,
int purgeAge,
int capacity)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbDataStore()
Method Detail |
---|
public void start(DbService dbService, int houseKeeperInterval, int purgeAge, int capacity) throws EsfStoreException
start
in interface DataStore
EsfStoreException
public void stop()
stop
in interface DataStore
public void update(int houseKeeperInterval, int purgeAge, int capacity)
update
in interface DataStore
public DataMessage store(String topic, byte[] payload, int qos, boolean retain, int priority) throws EsfStoreException
DataStore
store
in interface DataStore
EsfStoreException
public DataMessage get(int msgId) throws EsfStoreException
DataStore
get
in interface DataStore
msgId
- ID of the message to be loaded
EsfStoreException
public DataMessage getNextMessage() throws EsfStoreException
DataStore
getNextMessage
in interface DataStore
EsfStoreException
public void published(int msgId, int publishedMsgId, String sessionId) throws EsfStoreException
DataStore
published
in interface DataStore
sessionId
- TODO
EsfStoreException
public void published(int msgId) throws EsfStoreException
DataStore
published
in interface DataStore
EsfStoreException
public void confirmed(int msgId) throws EsfStoreException
DataStore
confirmed
in interface DataStore
EsfStoreException
public List<DataMessage> allUnpublishedMessagesNoPayload() throws EsfStoreException
DataStore
allUnpublishedMessagesNoPayload
in interface DataStore
EsfStoreException
public List<DataMessage> allInFlightMessagesNoPayload() throws EsfStoreException
DataStore
allInFlightMessagesNoPayload
in interface DataStore
EsfStoreException
public List<DataMessage> allDroppedInFlightMessagesNoPayload() throws EsfStoreException
DataStore
allDroppedInFlightMessagesNoPayload
in interface DataStore
EsfStoreException
public void unpublishAllInFlighMessages() throws EsfStoreException
DataStore
unpublishAllInFlighMessages
in interface DataStore
EsfStoreException
public void dropAllInFlightMessages() throws EsfStoreException
DataStore
dropAllInFlightMessages
in interface DataStore
EsfStoreException
public void deleteStaleMessages(int purgeAge) throws EsfStoreException
DataStore
deleteStaleMessages
in interface DataStore
EsfStoreException
public void defrag() throws EsfStoreException
DataStore
defrag
in interface DataStore
EsfStoreException
- TODOpublic void checkpoint() throws EsfStoreException
DataStore
checkpoint
in interface DataStore
EsfStoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |