mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-21 11:40:01 +00:00
Bug 4158: Implemented clearing of RaceLogs and RegattaLogs on clearState
This commit is contained in:
1 parent
69efe204d1
commit
a499f075f1
10 files changed
+50
No files matched your search
+4
@@ -144,7 +144,11 @@ public interface MongoObjectFactory {
|
||||
|
||||
void removeRaceLog(RaceLogIdentifier identifier);
|
||||
|
||||
void removeAllRaceLogs();
|
||||
|
||||
void removeRegattaLog(RegattaLikeIdentifier identifier);
|
||||
|
||||
void removeAllRegattaLogs();
|
||||
|
||||
void storeResultUrl(String resultProviderName, URL url);
|
||||
|
||||
|
||||
+10
@@ -1355,6 +1355,11 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
storeRaceLogIdentifier(identifier, query);
|
||||
getRaceLogCollection().remove(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAllRaceLogs() {
|
||||
getRaceLogCollection().drop();;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeRegattaLog(RegattaLikeIdentifier identifier) {
|
||||
@@ -1362,6 +1367,11 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
addRegattaLikeIdentifier(identifier, query);
|
||||
getRegattaLogCollection().remove(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAllRegattaLogs() {
|
||||
getRegattaLogCollection().drop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeResultUrl(String resultProviderName, URL url) {
|
||||
|
||||
+6
@@ -67,4 +67,10 @@ public class MongoRaceLogStoreImpl implements RaceLogStore {
|
||||
raceLogCache.put(identifier, raceLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
mongoObjectFactory.removeAllRaceLogs();
|
||||
raceLogCache.clear();
|
||||
}
|
||||
|
||||
}
|
||||
+6
@@ -49,4 +49,10 @@ public class MongoRegattaLogStoreImpl implements RegattaLogStore {
|
||||
addListener(identifier, regattaLog);
|
||||
regattaLogCache.put(identifier, regattaLog);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
mongoObjectFactory.removeAllRegattaLogs();
|
||||
regattaLogCache.clear();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user