|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataStore
DataStore implementation have the responsibility of doing the bookkeeping of the messages that are in transient in the system. A message in the system normally flows through the following states: stored -> published -> confirmed (or dropped). The data store should be able to store messages, track and update their state, and perform certain queries for messages in a given state.
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)
|
Method Detail |
---|
void start(DbService dbService, int houseKeeperInterval, int purgeAge, int capacity) throws EsfStoreException
EsfStoreException
void update(int houseKeeperInterval, int purgeAge, int capacity)
void stop()
DataMessage store(String topic, byte[] payload, int qos, boolean retain, int priority) throws EsfStoreException
topic
- payload
- qos
- retain
- priority
-
EsfStoreException
void published(int msgId, int publishedMsgId, String sessionId) throws EsfStoreException
msgId
- publishedMsgId
- sessionId
- TODO
EsfStoreException
void published(int msgId) throws EsfStoreException
msgId
- publishedMsgId
-
EsfStoreException
void confirmed(int msgId) throws EsfStoreException
msgId
-
EsfStoreException
DataMessage getNextMessage() throws EsfStoreException
EsfStoreException
DataMessage get(int msgId) throws EsfStoreException
msgId
- ID of the message to be loaded
EsfStoreException
List<DataMessage> allUnpublishedMessagesNoPayload() throws EsfStoreException
EsfStoreException
List<DataMessage> allInFlightMessagesNoPayload() throws EsfStoreException
EsfStoreException
List<DataMessage> allDroppedInFlightMessagesNoPayload() throws EsfStoreException
EsfStoreException
void unpublishAllInFlighMessages() throws EsfStoreException
EsfStoreException
void dropAllInFlightMessages() throws EsfStoreException
EsfStoreException
void deleteStaleMessages(int purgeAge) throws EsfStoreException
purgeAge
-
EsfStoreException
void defrag() throws EsfStoreException
EsfStoreException
- TODOvoid checkpoint() throws EsfStoreException
EsfStoreException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |