mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-28 00:16:46 +00:00
added TODOs to TrackedRaceImpl regarding course updates; expose mongo.port property
This commit is contained in:
+14
-1
@@ -9,6 +9,7 @@ import java.util.concurrent.ConcurrentSkipListSet;
|
||||
|
||||
import com.sap.sailing.domain.base.Buoy;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.CourseListener;
|
||||
import com.sap.sailing.domain.base.Distance;
|
||||
import com.sap.sailing.domain.base.Leg;
|
||||
import com.sap.sailing.domain.base.Position;
|
||||
@@ -32,7 +33,7 @@ import com.sap.sailing.domain.tracking.WindStore;
|
||||
import com.sap.sailing.domain.tracking.WindTrack;
|
||||
import com.sap.sailing.util.Util;
|
||||
|
||||
public abstract class TrackedRaceImpl implements TrackedRace {
|
||||
public abstract class TrackedRaceImpl implements TrackedRace, CourseListener {
|
||||
// TODO observe the race course; if it changes, update leg structures; consider fine-grained update events that tell what changed
|
||||
private final RaceDefinition race;
|
||||
|
||||
@@ -374,4 +375,16 @@ public abstract class TrackedRaceImpl implements TrackedRace {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void waypointAdded(int zeroBasedIndex, Waypoint waypointThatGotAdded) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void waypointRemoved(int zeroBasedIndex, Waypoint waypointThatGotRemoved) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -21,6 +21,12 @@ public class MongoWindStoreFactoryImpl implements MongoWindStoreFactory, BundleA
|
||||
private int defaultPort;
|
||||
private String defaultDatabaseName;
|
||||
|
||||
public MongoWindStoreFactoryImpl() {
|
||||
defaultHostName = "127.0.0.1";
|
||||
defaultPort = 27017;
|
||||
defaultDatabaseName = DEFAULT_DB_NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MongoWindStore getMongoWindStore(MongoObjectFactory mongoObjectFactory) throws UnknownHostException, MongoException {
|
||||
return getMongoWindStore(defaultHostName, defaultPort, defaultDatabaseName, mongoObjectFactory);
|
||||
@@ -62,6 +68,9 @@ public class MongoWindStoreFactoryImpl implements MongoWindStoreFactory, BundleA
|
||||
}
|
||||
|
||||
public static MongoWindStoreFactory getDefaultInstance() {
|
||||
if (defaultInstance == null) {
|
||||
defaultInstance = new MongoWindStoreFactoryImpl();
|
||||
}
|
||||
return defaultInstance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user