mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-05 18:42:55 +00:00
Merge branch 'master' into bug2026
Conflicts: java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/ReplicationPanel.java
This commit is contained in:
commit
e992653830
28 files changed
+181
-52
No files matched your search
+9
@@ -66,6 +66,15 @@ public class MockedTrackedRaceWithFixedRank extends MockedTrackedRace {
|
||||
public Serializable getId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Competitor getCompetitorById(Serializable competitorID) {
|
||||
if (competitorID.equals(MockedTrackedRaceWithFixedRank.this.competitor.getId())) {
|
||||
return MockedTrackedRaceWithFixedRank.this.competitor;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+10
@@ -32,6 +32,16 @@ public class MockedTrackedRaceWithFixedRankAndManyCompetitors extends MockedTrac
|
||||
public Iterable<Competitor> getCompetitors() {
|
||||
return competitors;
|
||||
}
|
||||
@Override
|
||||
public Competitor getCompetitorById(Serializable competitorID) {
|
||||
for (Competitor competitor : competitors) {
|
||||
if (competitorID.equals(competitor.getId())) {
|
||||
return competitor;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoatClass getBoatClass() {
|
||||
return null;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.sap.sailing.domain.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.common.WithID;
|
||||
import com.sap.sse.common.Named;
|
||||
|
||||
@@ -21,4 +23,6 @@ public interface RaceDefinition extends Named, WithID {
|
||||
Course getCourse();
|
||||
|
||||
Iterable<Competitor> getCompetitors();
|
||||
|
||||
Competitor getCompetitorById(Serializable competitorID);
|
||||
}
|
||||
+10
-7
@@ -1,8 +1,7 @@
|
||||
package com.sap.sailing.domain.base.impl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Set;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
@@ -13,7 +12,7 @@ import com.sap.sailing.domain.common.impl.NamedImpl;
|
||||
public class RaceDefinitionImpl extends NamedImpl implements RaceDefinition {
|
||||
private static final long serialVersionUID = -1900955198751393727L;
|
||||
private final Course course;
|
||||
private final Iterable<Competitor> competitors;
|
||||
private final LinkedHashMap<Serializable, Competitor> competitorsById;
|
||||
private final BoatClass boatClass;
|
||||
private final Serializable id;
|
||||
|
||||
@@ -26,11 +25,10 @@ public class RaceDefinitionImpl extends NamedImpl implements RaceDefinition {
|
||||
assert name != null;
|
||||
|
||||
this.course = course;
|
||||
Set<Competitor> competitorsAsLinkedHashSet = new LinkedHashSet<Competitor>();
|
||||
this.competitorsById = new LinkedHashMap<>();
|
||||
for (Competitor competitor : competitors) {
|
||||
competitorsAsLinkedHashSet.add(competitor);
|
||||
competitorsById.put(competitor.getId(), competitor);
|
||||
}
|
||||
this.competitors = competitorsAsLinkedHashSet;
|
||||
this.boatClass = boatClass;
|
||||
this.id = id;
|
||||
}
|
||||
@@ -47,7 +45,12 @@ public class RaceDefinitionImpl extends NamedImpl implements RaceDefinition {
|
||||
|
||||
@Override
|
||||
public Iterable<Competitor> getCompetitors() {
|
||||
return competitors;
|
||||
return competitorsById.values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Competitor getCompetitorById(Serializable competitorID) {
|
||||
return competitorsById.get(competitorID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ public class LeaderboardCacheManager {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markPositionChanged(GPSFix fix, Mark mark) {
|
||||
public void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
removeFromCache(leaderboard);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -312,7 +312,7 @@ public abstract class AbstractSimpleLeaderboardImpl implements Leaderboard, Race
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markPositionChanged(GPSFix fix, Mark mark) {
|
||||
public void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
invalidateCacheAndRemoveThisListenerFromTrackedRace();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@ public class MarkPassingUpdateListener extends AbstractRaceChangeListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markPositionChanged(GPSFix fix, Mark mark) {
|
||||
public void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
queue.add(new Util.Pair<Object, GPSFix>(mark, fix));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ package com.sap.sailing.domain.tracking;
|
||||
import java.io.Serializable;
|
||||
|
||||
public interface GPSTrackListener<ItemType, FixType extends GPSFix> extends Serializable {
|
||||
void gpsFixReceived(FixType fix, ItemType item);
|
||||
void gpsFixReceived(FixType fix, ItemType item, boolean firstFixInTrack);
|
||||
|
||||
void speedAveragingChanged(long oldMillisecondsOverWhichToAverage, long newMillisecondsOverWhichToAverage);
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import com.sap.sailing.domain.common.WindSource;
|
||||
public interface RaceChangeListener extends CourseListener {
|
||||
void competitorPositionChanged(GPSFixMoving fix, Competitor competitor);
|
||||
|
||||
void markPositionChanged(GPSFix fix, Mark mark);
|
||||
void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack);
|
||||
|
||||
/**
|
||||
* Invoked after the mark passings have been updated in the {@link TrackedRace}.
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public abstract class AbstractRaceChangeListener implements RaceChangeListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markPositionChanged(GPSFix fix, Mark mark) {
|
||||
public void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+1
-1
@@ -397,7 +397,7 @@ public class CrossTrackErrorCache extends AbstractRaceChangeListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markPositionChanged(GPSFix fix, Mark mark) {
|
||||
public void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
TimePoint from = owner.getOrCreateTrack(mark).getEstimatedPositionTimePeriodAffectedBy(fix).getA();
|
||||
final List<Competitor> shuffledCompetitors = new ArrayList<>(cachePerCompetitor.keySet());
|
||||
Collections.shuffle(shuffledCompetitors);
|
||||
|
||||
+10
-8
@@ -212,20 +212,20 @@ DynamicTrackedRace, GPSTrackListener<Competitor, GPSFixMoving> {
|
||||
|
||||
/**
|
||||
* In addition to creating the track which is performed by the superclass implementation, this implementation registers
|
||||
* a {@link GPSTrackListener} with the mark's track and {@link #notifyListeners(GPSFix, Mark) notifies the listeners}
|
||||
* a {@link GPSTrackListener} with the mark's track and {@link #notifyListeners(GPSFix, Mark, boolean) notifies the listeners}
|
||||
* about updates. The {@link #updated(TimePoint)} method is <em>not</em> called with the mark fix's time point because
|
||||
* mark fixes may be received also from marks that don't belong to this race.
|
||||
*/
|
||||
@Override
|
||||
protected DynamicGPSFixTrackImpl<Mark> createMarkTrack(Mark mark) {
|
||||
DynamicGPSFixTrackImpl<Mark> result = super.createMarkTrack(mark);
|
||||
final DynamicGPSFixTrackImpl<Mark> result = super.createMarkTrack(mark);
|
||||
result.addListener(new GPSTrackListener<Mark, GPSFix>() {
|
||||
private static final long serialVersionUID = -2855787105725103732L;
|
||||
|
||||
@Override
|
||||
public void gpsFixReceived(GPSFix fix, Mark mark) {
|
||||
public void gpsFixReceived(GPSFix fix, Mark mark, boolean firstFixInTrack) {
|
||||
triggerManeuverCacheRecalculationForAllCompetitors();
|
||||
notifyListeners(fix, mark);
|
||||
notifyListeners(fix, mark, firstFixInTrack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -306,8 +306,10 @@ DynamicTrackedRace, GPSTrackListener<Competitor, GPSFixMoving> {
|
||||
GPSFixTrack<Mark, GPSFix> markTrack = getOrCreateTrack(mark);
|
||||
markTrack.lockForRead();
|
||||
try {
|
||||
boolean firstInTrack = true;
|
||||
for (GPSFix fix : markTrack.getRawFixes()) {
|
||||
listener.markPositionChanged(fix, mark);
|
||||
listener.markPositionChanged(fix, mark, firstInTrack);
|
||||
firstInTrack = false;
|
||||
}
|
||||
} finally {
|
||||
markTrack.unlockAfterRead();
|
||||
@@ -437,14 +439,14 @@ DynamicTrackedRace, GPSTrackListener<Competitor, GPSFixMoving> {
|
||||
notifyListenersWaypointRemoved(zeroBasedIndex, waypointThatGotRemoved);
|
||||
}
|
||||
|
||||
private void notifyListeners(GPSFix fix, Mark mark) {
|
||||
private void notifyListeners(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
RaceChangeListener[] listeners;
|
||||
synchronized (getListeners()) {
|
||||
listeners = getListeners().toArray(new RaceChangeListener[getListeners().size()]);
|
||||
}
|
||||
for (RaceChangeListener listener : listeners) {
|
||||
try {
|
||||
listener.markPositionChanged(fix, mark);
|
||||
listener.markPositionChanged(fix, mark, firstInTrack);
|
||||
} catch (Exception e) {
|
||||
logger.log(Level.SEVERE, "RaceChangeListener " + listener + " threw exception " + e.getMessage());
|
||||
logger.log(Level.SEVERE, "notifyListeners(GPSFix, Competitor)", e);
|
||||
@@ -800,7 +802,7 @@ DynamicTrackedRace, GPSTrackListener<Competitor, GPSFixMoving> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gpsFixReceived(GPSFixMoving fix, Competitor competitor) {
|
||||
public void gpsFixReceived(GPSFixMoving fix, Competitor competitor, boolean firstFixInTrack) {
|
||||
updated(fix.getTimePoint());
|
||||
triggerManeuverCacheRecalculation(competitor);
|
||||
notifyListeners(fix, competitor);
|
||||
|
||||
+3
-1
@@ -1009,8 +1009,10 @@ public class GPSFixTrackImpl<ItemType, FixType extends GPSFix> extends TrackImpl
|
||||
@Override
|
||||
protected boolean add(FixType fix) {
|
||||
final boolean result;
|
||||
final boolean firstFixInTrack;
|
||||
lockForWrite();
|
||||
try {
|
||||
firstFixInTrack = getRawFixes().isEmpty();
|
||||
result = addWithoutLocking(fix);
|
||||
invalidateValidityAndDistanceCaches(fix);
|
||||
} finally {
|
||||
@@ -1034,7 +1036,7 @@ public class GPSFixTrackImpl<ItemType, FixType extends GPSFix> extends TrackImpl
|
||||
}
|
||||
}
|
||||
for (GPSTrackListener<ItemType, FixType> listener : getListeners()) {
|
||||
listener.gpsFixReceived(fix, getTrackedItem());
|
||||
listener.gpsFixReceived(fix, getTrackedItem(), firstFixInTrack);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
+1
-1
@@ -79,7 +79,7 @@ public class MaxSpeedCache<ItemType, FixType extends GPSFix> implements GPSTrack
|
||||
* outside of the invalidation interval, crop cache entry's interval such that it's overlap-free, otherwise remove.
|
||||
*/
|
||||
@Override
|
||||
public void gpsFixReceived(FixType fix, ItemType item) {
|
||||
public void gpsFixReceived(FixType fix, ItemType item, boolean firstFixInTrack) {
|
||||
// find the invalidation interval such that getFixesRelevantForSpeedEstimation, when passed any time point from that interval, produces "fix"
|
||||
Util.Pair<TimePoint, TimePoint> invalidationInterval = track.getTimeIntervalWhoseEstimatedSpeedMayHaveChangedAfterAddingFix(fix);
|
||||
LockUtil.lockForWrite(lock);
|
||||
|
||||
+1
-1
@@ -693,7 +693,7 @@ public class TrackBasedEstimationWindTrackImpl extends VirtualWindTrackImpl impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markPositionChanged(GPSFix fix, Mark mark) {
|
||||
public void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
assert fix != null && fix.getTimePoint() != null;
|
||||
// A mark position change can mean a leg type change. The interval over which the wind estimation is affected
|
||||
// depends on how the GPS track computes the estimated mark position. Ask it:
|
||||
|
||||
+1
-1
@@ -285,7 +285,7 @@ public class TrackedLegImpl implements TrackedLeg, RaceChangeListener {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markPositionChanged(GPSFix fix, Mark mark) {
|
||||
public void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
clearCaches();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2487,7 +2487,7 @@ public abstract class TrackedRaceImpl extends TrackedRaceWithWindEssentials impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public void gpsFixReceived(GPSFix fix, Mark mark) {
|
||||
public void gpsFixReceived(GPSFix fix, Mark mark, boolean firstFixInTrack) {
|
||||
clearDirectionFromStartToNextMarkCache();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -234,7 +234,7 @@ public class ReplicationPanel extends FlowPanel {
|
||||
i++;
|
||||
registeredReplicas.insertRow(i);
|
||||
registeredReplicas.setWidget(i, 1, new Label(stringMessages.totalSize()));
|
||||
registeredReplicas.setWidget(i, 2, new Label(""+replica.getNumberOfBytesSent()+"B ("+replica.getNumberOfBytesSent()/1000.0+"kB)"));
|
||||
registeredReplicas.setWidget(i, 2, new Label(""+replica.getNumberOfBytesSent()+"B ("+replica.getNumberOfBytesSent()/1024.0/1024.0+"MB)"));
|
||||
i++;
|
||||
for (Map.Entry<String, Integer> e : replica.getOperationCountByOperationClassName().entrySet()) {
|
||||
registeredReplicas.insertRow(i);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dexpedition.udp.port=2010 -Xmx4096m -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -Dkiwo.results=${project_loc:com.sap.sailing.kiworesultimport.test}/resources -Dpersistentcompetitors.clear=false -XX:+UseMembar -Digtimi.client.id=7fcdd217e0aa16090edb4ad55b09ec43b2021090e209541fc9b7003c2a2b70c6 -Digtimi.client.secret=aa569cf4909bdc7b0e04b11873f3c4ea20687421e010fcc25b771cca9e6f3f9a -Digtimi.client.redirecturi=http://127.0.0.1:8888/igtimi/oauth/v1/authorizationcallback -DspatialWind=true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dexpedition.udp.port=2010 -Xmx6000m -XX:+UseG1GC -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -Dkiwo.results=${project_loc:com.sap.sailing.kiworesultimport.test}/resources -Dpersistentcompetitors.clear=false -XX:+UseMembar -Digtimi.client.id=7fcdd217e0aa16090edb4ad55b09ec43b2021090e209541fc9b7003c2a2b70c6 -Digtimi.client.secret=aa569cf4909bdc7b0e04b11873f3c4ea20687421e010fcc25b771cca9e6f3f9a -Digtimi.client.redirecturi=http://127.0.0.1:8888/igtimi/oauth/v1/authorizationcallback -DspatialWind=true"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<stringAttribute key="profilingTraceType-ALLOCATION_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%INCREASE_COUNT%CTX_KEY%8192%CTX_ENTRY%KEY_MIN_SIZE%CTX_KEY%32%CTX_ENTRY%KEY_MAX_SIZE%CTX_KEY%65536%CTX_ENTRY%KEY_INC_LINE_NRS%CTX_KEY%true%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%CLASS_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ADAPTIVE%CTX_KEY%false%CTX_ENTRY%"/>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djetty.port=8889 -Dreplication.exchangeName=sapsailinganalytics-replica -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dexpedition.udp.port=2011 -Xmx6000m -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -XX:+UseMembar"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djetty.port=8889 -Dreplication.exchangeName=sapsailinganalytics-replica -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dexpedition.udp.port=2011 -Xmx6000m -XX:+UseG1GC -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -XX:+UseMembar"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dfile.encoding=cp1252 -Dexpedition.udp.port=2010 -Xmx6000m -Dhttp.proxyHost=proxy.pal.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.pal.sap.corp -Dhttps.proxyPort=8080 -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -Dkiwo.results=${project_loc:com.sap.sailing.kiworesultimport.test}/resources -Dpersistentcompetitors.clear=false -XX:+UseMembar -Digtimi.client.id=7fcdd217e0aa16090edb4ad55b09ec43b2021090e209541fc9b7003c2a2b70c6 -Digtimi.client.secret=aa569cf4909bdc7b0e04b11873f3c4ea20687421e010fcc25b771cca9e6f3f9a -Digtimi.client.redirecturi=http://127.0.0.1:8888/igtimi/oauth/v1/authorizationcallback"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-ea -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dfile.encoding=cp1252 -Dexpedition.udp.port=2010 -Xmx6000m -XX:+UseG1GC -Dhttp.proxyHost=proxy.pal.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy.pal.sap.corp -Dhttps.proxyPort=8080 -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -Dkiwo.results=${project_loc:com.sap.sailing.kiworesultimport.test}/resources -Dpersistentcompetitors.clear=false -XX:+UseMembar -Digtimi.client.id=7fcdd217e0aa16090edb4ad55b09ec43b2021090e209541fc9b7003c2a2b70c6 -Digtimi.client.secret=aa569cf4909bdc7b0e04b11873f3c4ea20687421e010fcc25b771cca9e6f3f9a -Digtimi.client.redirecturi=http://127.0.0.1:8888/igtimi/oauth/v1/authorizationcallback"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<stringAttribute key="profilingTraceType-ALLOCATION_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_INC_LINE_NRS%CTX_KEY%true%CTX_ENTRY%KEY_MAX_SIZE%CTX_KEY%65536%CTX_ENTRY%INCREASE_COUNT%CTX_KEY%8192%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ID%CTX_KEY%false%CTX_ENTRY%KEY_MIN_SIZE%CTX_KEY%32%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%CLASS_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ADAPTIVE%CTX_KEY%false%CTX_ENTRY%KEY_JRUBY_SUPPORT%CTX_KEY%false%CTX_ENTRY%"/>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog -console -clean"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djetty.port=8889 -Dreplication.exchangeName=sapsailinganalytics-replica -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dexpedition.udp.port=2011 -Xmx6000m -Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy -Dhttps.proxyPort=8080 -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -XX:+UseMembar"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djetty.port=8889 -Dreplication.exchangeName=sapsailinganalytics-replica -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dexpedition.udp.port=2011 -Xmx6000m -XX:+UseG1GC -Dhttp.proxyHost=proxy.wdf.sap.corp -Dhttp.proxyPort=8080 -Dhttps.proxyHost=proxy -Dhttps.proxyPort=8080 -Djetty.home=${project_loc:com.sap.sailing.server}/../target/configuration/jetty -Djava.util.logging.config.file=${project_loc:com.sap.sailing.server}/../target/configuration/logging_debug.properties -XX:+UseMembar"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.WORKING_DIRECTORY" value="${workspace_loc}"/>
|
||||
<stringAttribute key="pde.version" value="3.3"/>
|
||||
<booleanAttribute key="show_selected_only" value="false"/>
|
||||
|
||||
+10
-2
@@ -163,6 +163,8 @@ import com.sap.sailing.server.operationaltransformation.CreateTrackedRace;
|
||||
import com.sap.sailing.server.operationaltransformation.DataImportFailed;
|
||||
import com.sap.sailing.server.operationaltransformation.RecordCompetitorGPSFix;
|
||||
import com.sap.sailing.server.operationaltransformation.RecordMarkGPSFix;
|
||||
import com.sap.sailing.server.operationaltransformation.RecordMarkGPSFixForExistingTrack;
|
||||
import com.sap.sailing.server.operationaltransformation.RecordMarkGPSFixForNewMarkTrack;
|
||||
import com.sap.sailing.server.operationaltransformation.RecordWindFix;
|
||||
import com.sap.sailing.server.operationaltransformation.RemoveDeviceConfiguration;
|
||||
import com.sap.sailing.server.operationaltransformation.RemoveEvent;
|
||||
@@ -1370,8 +1372,14 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markPositionChanged(GPSFix fix, Mark mark) {
|
||||
replicate(new RecordMarkGPSFix(getRaceIdentifier(), mark, fix));
|
||||
public void markPositionChanged(GPSFix fix, Mark mark, boolean firstInTrack) {
|
||||
final RecordMarkGPSFix operation;
|
||||
if (firstInTrack) {
|
||||
operation = new RecordMarkGPSFixForNewMarkTrack(getRaceIdentifier(), mark, fix);
|
||||
} else {
|
||||
operation = new RecordMarkGPSFixForExistingTrack(getRaceIdentifier(), mark, fix);
|
||||
}
|
||||
replicate(operation);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+5
-2
@@ -1,5 +1,7 @@
|
||||
package com.sap.sailing.server.operationaltransformation;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
@@ -9,12 +11,12 @@ import com.sap.sailing.server.RacingEventServiceOperation;
|
||||
|
||||
public class RecordCompetitorGPSFix extends AbstractRaceOperation<Void> {
|
||||
private static final long serialVersionUID = 5847067037829132465L;
|
||||
private final Competitor competitor;
|
||||
private final Serializable competitorID;
|
||||
private final GPSFixMoving gpsFix;
|
||||
|
||||
public RecordCompetitorGPSFix(RegattaAndRaceIdentifier raceIdentifier, Competitor competitor, GPSFixMoving gpsFix) {
|
||||
super(raceIdentifier);
|
||||
this.competitor = competitor;
|
||||
this.competitorID = competitor.getId();
|
||||
this.gpsFix = gpsFix;
|
||||
}
|
||||
|
||||
@@ -30,6 +32,7 @@ public class RecordCompetitorGPSFix extends AbstractRaceOperation<Void> {
|
||||
@Override
|
||||
public Void internalApplyTo(RacingEventService toState) throws Exception {
|
||||
DynamicTrackedRace trackedRace = (DynamicTrackedRace) toState.getTrackedRace(getRaceIdentifier());
|
||||
Competitor competitor = trackedRace.getRace().getCompetitorById(competitorID);
|
||||
trackedRace.recordFix(competitor, gpsFix);
|
||||
return null;
|
||||
}
|
||||
|
||||
+6
-16
@@ -1,37 +1,27 @@
|
||||
package com.sap.sailing.server.operationaltransformation;
|
||||
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.GPSFix;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
import com.sap.sailing.server.RacingEventServiceOperation;
|
||||
|
||||
public class RecordMarkGPSFix extends AbstractRaceOperation<Void> {
|
||||
public abstract class RecordMarkGPSFix extends AbstractRaceOperation<Void> {
|
||||
private static final long serialVersionUID = -2149936580623244814L;
|
||||
private final Mark mark;
|
||||
private final GPSFix fix;
|
||||
|
||||
public RecordMarkGPSFix(RegattaAndRaceIdentifier raceIdentifier, Mark mark, GPSFix fix) {
|
||||
public RecordMarkGPSFix(RegattaAndRaceIdentifier raceIdentifier, GPSFix fix) {
|
||||
super(raceIdentifier);
|
||||
this.mark = mark;
|
||||
this.fix = fix;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operations of this type can be run in parallel to other operations; subsequent operations do not have to wait
|
||||
* for this operation's completion.
|
||||
*/
|
||||
@Override
|
||||
public boolean requiresSynchronousExecution() {
|
||||
return false;
|
||||
protected GPSFix getFix() {
|
||||
return fix;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void internalApplyTo(RacingEventService toState) throws Exception {
|
||||
protected DynamicTrackedRace getTrackedRace(RacingEventService toState) {
|
||||
DynamicTrackedRace trackedRace = (DynamicTrackedRace) toState.getTrackedRace(getRaceIdentifier());
|
||||
trackedRace.recordFix(mark, fix);
|
||||
return null;
|
||||
return trackedRace;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
package com.sap.sailing.server.operationaltransformation;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.GPSFix;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
|
||||
public class RecordMarkGPSFixForExistingTrack extends RecordMarkGPSFix {
|
||||
private static final long serialVersionUID = -3953907832324217209L;
|
||||
private final Serializable markId;
|
||||
|
||||
public RecordMarkGPSFixForExistingTrack(RegattaAndRaceIdentifier raceIdentifier, Mark mark, GPSFix fix) {
|
||||
super(raceIdentifier, fix);
|
||||
this.markId = mark.getId();
|
||||
}
|
||||
|
||||
private Mark getMarkById(DynamicTrackedRace trackedRace) {
|
||||
Mark result = null;
|
||||
for (Mark mark : trackedRace.getMarks()) {
|
||||
if (mark.getId().equals(markId)) {
|
||||
result = mark;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void internalApplyTo(RacingEventService toState) throws Exception {
|
||||
DynamicTrackedRace trackedRace = getTrackedRace(toState);
|
||||
Mark mark = getMarkById(trackedRace);
|
||||
trackedRace.recordFix(mark, getFix());
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operations of this type can be run in parallel to other operations; subsequent operations do not have to wait
|
||||
* for this operation's completion.
|
||||
*/
|
||||
@Override
|
||||
public boolean requiresSynchronousExecution() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.sap.sailing.server.operationaltransformation;
|
||||
|
||||
import com.sap.sailing.domain.base.Mark;
|
||||
import com.sap.sailing.domain.common.RegattaAndRaceIdentifier;
|
||||
import com.sap.sailing.domain.tracking.DynamicTrackedRace;
|
||||
import com.sap.sailing.domain.tracking.GPSFix;
|
||||
import com.sap.sailing.server.RacingEventService;
|
||||
|
||||
/**
|
||||
* Records a mark fix for a mark whose track was just created. Such an operation carries the full {@link Mark} object
|
||||
* because the receiver needs it in order to construct the mark track.
|
||||
*
|
||||
* @author Axel Uhl (d043530)
|
||||
*
|
||||
*/
|
||||
public class RecordMarkGPSFixForNewMarkTrack extends RecordMarkGPSFix {
|
||||
private static final long serialVersionUID = 6462303849651033783L;
|
||||
private final Mark mark;
|
||||
|
||||
public RecordMarkGPSFixForNewMarkTrack(RegattaAndRaceIdentifier raceIdentifier, Mark mark, GPSFix fix) {
|
||||
super(raceIdentifier, fix);
|
||||
this.mark = mark;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Void internalApplyTo(RacingEventService toState) throws Exception {
|
||||
DynamicTrackedRace trackedRace = getTrackedRace(toState);
|
||||
trackedRace.recordFix(mark, getFix());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#Bug 2043 <br/>
|
||||
|
||||
GAnalytics Homepage: http://www.google.com/intl/en/analytics/ <br/>
|
||||
GAnalytics Account: gmsponsorship@gmail.com <br/>
|
||||
GAnalytics PW: <br/>
|
||||
<br/>
|
||||
GAnalytics Tracking ID: **UA-52789785-1**<br/>
|
||||
<br/>
|
||||
**track events (clicks on links):**<br/>
|
||||
insert onClick() method for each link <br/>
|
||||
Syntax: _onClick="_gaq.push(['_trackEvent', category, action, label])_ <br/>
|
||||
see also: https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide <br/>
|
||||
It might take a day, until the results are available on the dashboard (it will appear under "Behavior/Verhalten")<br/>
|
||||
|
||||
**track page load time:**<br/>
|
||||
see: https://developers.google.com/analytics/devguides/collection/gajs/methods/gaJSApiBasicConfiguration#_gat.GA_Tracker_._trackPageview
|
||||
|
||||
**useful information for web page tracking with ganalytics:** <br/>
|
||||
https://developers.google.com/analytics/devguides/collection/gajs/
|
||||
Reference in new issue
Block a user