RaceTracker objects now know the connectivity parmaeter objects from which they were originally created

Change-Id: Ifc3b20618b25f5a4a489108b283a44b9087a31c2
This commit is contained in:
Axel Uhl committed 2016-12-29 15:33:17 +01:00
1 parent 6ed29f7d12
commit c20cf52f4d
21 files changed
+117 -66

No files matched your search

@@ -149,7 +149,7 @@ public interface DomainObjectFactory {
* marked as to be restored} before the server got re-started. Callers that would like to use the result to re-connect to
* those races should take care not to flood servers with requests. Instead, ideally, callers would monitor the
* loading {@link TrackedRace#getStatus() status} or the resulting {@link TrackedRace}s (see
* {@link RaceTracker#getRacesHandle()}, {@link RaceHandle#getRace(long)}, {@link RaceHandle#getTrackedRegatta()}
* {@link RaceTracker#getRaceHandle()}, {@link RaceHandle#getRace(long)}, {@link RaceHandle#getTrackedRegatta()}
* and {@link TrackedRegatta#getTrackedRace(RaceDefinition)}.
*
* @see MongoObjectFactory#addConnectivityParametersForRaceToRestore(RaceTrackingConnectivityParameters)
@@ -170,4 +170,11 @@ public interface MongoObjectFactory {
* @see #removeConnectivityParametersForRaceToRestore(RaceTrackingConnectivityParameters)
*/
void addConnectivityParametersForRaceToRestore(RaceTrackingConnectivityParameters params);
/**
* Removes all {@link RaceTrackingConnectivityParameters} objects from those to restore; short for calling
* {@link #removeConnectivityParametersForRaceToRestore(RaceTrackingConnectivityParameters)} for all parameter
* objects obtained through {@link DomainObjectFactory#loadConnectivityParametersForRacesToRestore()}.
*/
void removeAllConnectivityParametersForRacesToRestore();
}
@@ -1551,7 +1551,11 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
logger.warning("Couldn't find a persistence service for connectivity parameters of type "+typeIdentifier+
". Couldn't store race "+params.getTrackerID()+" for restoring.");
}
}
@Override
public void removeAllConnectivityParametersForRacesToRestore() {
database.getCollection(CollectionNames.CONNECTIVITY_PARAMS_FOR_RACES_TO_BE_RESTORED.name()).drop();
}
}