Add comment on purging sequence number map

This commit is contained in:
Ivan Vilata-i-Balaguer 2016-04-13 11:45:45 +02:00
parent 1db81e3177
commit 4b5a393911

View File

@ -493,6 +493,7 @@ public class P2PDataStorage implements MessageListener, ConnectionListener {
return new ByteArray(Hash.getHash(data));
}
// Get a new map with entries older than 10 days purged from the given map.
private HashMap<ByteArray, MapValue> getPurgedSequenceNumberMap(HashMap<ByteArray, MapValue> persisted) {
HashMap<ByteArray, MapValue> purged = new HashMap<>();
long maxAgeTs = System.currentTimeMillis() - TimeUnit.DAYS.toMillis(10);