Added tracking of closed session time and expired session cleaner for clients that never reconnects but had clean session flag = false

This commit is contained in:
andsel
2017-10-20 11:48:34 +02:00
parent a49792adf5
commit f7b213a677
18 changed files with 405 additions and 24 deletions
@@ -19,8 +19,10 @@ package io.moquette.spi;
import io.moquette.persistence.PersistentSession;
import io.moquette.spi.IMessagesStore.StoredMessage;
import java.time.LocalDateTime;
import java.util.Collection;
import java.util.Queue;
import java.util.Set;
/**
* Store used to handle the persistence of the subscriptions tree.
@@ -115,4 +117,14 @@ public interface ISessionsStore {
int countPubReleaseWaitingPubComplete(String clientID);
void removeTemporaryQoS2(String clientID);
/**
* Tracks the closing time of a persistent session
* */
void trackSessionClose(LocalDateTime when, String clientID);
/**
* List the sessions ids closed before the pin date.
* */
Set<String> sessionOlderThan(LocalDateTime queryPin);
}