diff --git a/parser/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/HawtDBStorageService.java b/parser/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/HawtDBStorageService.java index 76736f97..85848203 100644 --- a/parser/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/HawtDBStorageService.java +++ b/parser/src/main/java/org/dna/mqtt/moquette/messaging/spi/impl/HawtDBStorageService.java @@ -38,8 +38,7 @@ public class HawtDBStorageService implements IStorageService { private SortedIndex m_inflightStore; //persistent Map of clientID, list of Subscriptions - //TODO rename into persistentSubscriptions - private SortedIndex> m_persistent; + private SortedIndex> m_persistentSubscriptions; public HawtDBStorageService() { String storeFile = Server.STORAGE_FILE_PATH; @@ -89,7 +88,7 @@ public class HawtDBStorageService implements IStorageService { new BTreeIndexFactory>(); indexFactory.setKeyCodec(StringCodec.INSTANCE); - m_persistent = (SortedIndex>) m_multiIndexFactory.openOrCreate("subscriptions", indexFactory); + m_persistentSubscriptions = (SortedIndex>) m_multiIndexFactory.openOrCreate("subscriptions", indexFactory); } /** @@ -157,22 +156,22 @@ public class HawtDBStorageService implements IStorageService { } public void addNewSubscription(Subscription newSubscription, String clientID) { - if (!m_persistent.containsKey(clientID)) { - m_persistent.put(clientID, new ArrayList()); + if (!m_persistentSubscriptions.containsKey(clientID)) { + m_persistentSubscriptions.put(clientID, new ArrayList()); } - List subs = m_persistent.get(clientID); + List subs = m_persistentSubscriptions.get(clientID); subs.add(newSubscription); - m_persistent.put(clientID, subs); + m_persistentSubscriptions.put(clientID, subs); } public void removeAllSubscriptions(String clientID) { - m_persistent.remove(clientID); + m_persistentSubscriptions.remove(clientID); } public List retrieveAllSubscriptions() { List allSubscriptions = new ArrayList(); - for (Map.Entry> entry : m_persistent) { + for (Map.Entry> entry : m_persistentSubscriptions) { allSubscriptions.addAll(entry.getValue()); } return allSubscriptions;