Minor, removed unused map in MapDBMessagesStore

This commit is contained in:
andsel
2016-01-30 11:05:03 +01:00
parent dfa75e145f
commit 25b6413be1
@@ -35,8 +35,6 @@ class MapDBMessagesStore implements IMessagesStore {
private DB m_db;
//map clientID <-> set of currently in flight packet identifiers
private Map<String, Set<Integer>> m_inFlightIds;
//maps clientID -> guid
private ConcurrentMap<String, String> m_retainedStore;
//maps guid to message, it's message store
@@ -51,7 +49,6 @@ class MapDBMessagesStore implements IMessagesStore {
public void initStore() {
m_retainedStore = m_db.getHashMap("retained");
m_persistentMessageStore = m_db.getHashMap("persistedMessages");
m_inFlightIds = m_db.getHashMap("inflightPacketIDs");
}
@Override
@@ -110,27 +107,6 @@ class MapDBMessagesStore implements IMessagesStore {
return m_persistentMessageStore.get(guid);
}
// /**
// * Return the next valid packetIdentifier for the given client session.
// * */
// @Override
// public int nextPacketID(String clientID) {
// Set<Integer> inFlightForClient = this.m_inFlightIds.get(clientID);
// if (inFlightForClient == null) {
// int nextPacketId = 1;
// inFlightForClient = new HashSet<>();
// inFlightForClient.add(nextPacketId);
// this.m_inFlightIds.put(clientID, inFlightForClient);
// return nextPacketId;
//
// }
//
// int maxId = inFlightForClient.isEmpty() ? 0 : Collections.max(inFlightForClient);
// int nextPacketId = (maxId + 1) % 0xFFFF;
// inFlightForClient.add(nextPacketId);
// return nextPacketId;
// }
@Override
public void cleanRetained(String topic) {
m_retainedStore.remove(topic);