mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-01 08:40:52 +00:00
Merge branch 'master' into polar-api
Conflicts: java/com.sap.sailing.server/SailingServer (No Proxy).launch java/com.sap.sailing.server/SailingServer (No Proxy, Remote Debug SAP VM).launch
This commit is contained in:
commit
d396a39dbc
43 files changed
+892
-507
No files matched your search
+6
@@ -12,6 +12,8 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.sap.sailing.domain.base.BoatClass;
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
@@ -34,6 +36,7 @@ import com.sap.sailing.domain.common.WithID;
|
||||
import com.sap.sailing.domain.common.configuration.DeviceConfigurationMatcherType;
|
||||
|
||||
public class SharedDomainFactoryImpl implements SharedDomainFactory {
|
||||
private static final Logger logger = Logger.getLogger(SharedDomainFactoryImpl.class.getName());
|
||||
|
||||
/**
|
||||
* Ensure that the <em>same</em> string is used as key that is also used to set the {@link Nationality}
|
||||
@@ -321,6 +324,9 @@ public class SharedDomainFactoryImpl implements SharedDomainFactory {
|
||||
|
||||
@Override
|
||||
public Competitor getOrCreateCompetitor(Serializable competitorId, String name, Color displayColor, DynamicTeam team, DynamicBoat boat) {
|
||||
if (logger.isLoggable(Level.FINEST)) {
|
||||
logger.log(Level.FINEST, "getting or creating competitor "+name+" with ID "+competitorId+" in domain factory "+this);
|
||||
}
|
||||
return getCompetitorStore().getOrCreateCompetitor(competitorId, name, displayColor, team, boat);
|
||||
}
|
||||
|
||||
|
||||
+10
@@ -10,6 +10,8 @@ import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.sap.sailing.domain.base.Competitor;
|
||||
import com.sap.sailing.domain.base.CompetitorStore;
|
||||
@@ -23,6 +25,7 @@ import com.sap.sailing.util.impl.LockUtil;
|
||||
import com.sap.sailing.util.impl.NamedReentrantReadWriteLock;
|
||||
|
||||
public class TransientCompetitorStoreImpl implements CompetitorStore, Serializable {
|
||||
private static final Logger logger = Logger.getLogger(TransientCompetitorStoreImpl.class.getName());
|
||||
private static final long serialVersionUID = -4198298775476586931L;
|
||||
private final Map<Serializable, Competitor> competitorCache;
|
||||
private final Map<String, Competitor> competitorsByIdAsString;
|
||||
@@ -67,6 +70,9 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
|
||||
private Competitor createCompetitor(Serializable id, String name, Color displayColor, DynamicTeam team, DynamicBoat boat) {
|
||||
Competitor result = new CompetitorImpl(id, name, displayColor, team, boat);
|
||||
addNewCompetitor(id, result);
|
||||
if (logger.isLoggable(Level.FINEST)) {
|
||||
logger.log(Level.FINEST, "Created competitor "+name+" with ID "+id, new Exception("Here is where it happened"));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -151,6 +157,9 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
|
||||
competitorCache.clear();
|
||||
competitorsByIdAsString.clear();
|
||||
competitorsToUpdateDuringGetOrCreate.clear();
|
||||
if (logger.isLoggable(Level.FINEST)) {
|
||||
logger.log(Level.FINEST, "Clearing competitor store "+this, new Exception("here is where it happened"));
|
||||
}
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(lock);
|
||||
}
|
||||
@@ -170,6 +179,7 @@ public class TransientCompetitorStoreImpl implements CompetitorStore, Serializab
|
||||
public void removeCompetitor(Competitor competitor) {
|
||||
LockUtil.lockForWrite(lock);
|
||||
try {
|
||||
logger.fine("removing competitor "+competitor+" from competitor store "+this);
|
||||
competitorCache.remove(competitor.getId());
|
||||
competitorsByIdAsString.remove(competitor.getId().toString());
|
||||
weakCompetitorDTOCache.remove(competitor);
|
||||
|
||||
+6
-3
@@ -101,19 +101,22 @@ public interface TrackedLegOfCompetitor extends Serializable {
|
||||
List<Maneuver> getManeuvers(TimePoint timePoint, boolean waitForLatest) throws NoWindException;
|
||||
|
||||
/**
|
||||
* @param waitForLatest TODO
|
||||
* @return <code>null</code> if the competitor hasn't started this leg yet
|
||||
*/
|
||||
Integer getNumberOfTacks(TimePoint timePoint) throws NoWindException;
|
||||
Integer getNumberOfTacks(TimePoint timePoint, boolean waitForLatest) throws NoWindException;
|
||||
|
||||
/**
|
||||
* @param waitForLatest TODO
|
||||
* @return <code>null</code> if the competitor hasn't started this leg yet
|
||||
*/
|
||||
Integer getNumberOfJibes(TimePoint timePoint) throws NoWindException;
|
||||
Integer getNumberOfJibes(TimePoint timePoint, boolean waitForLatest) throws NoWindException;
|
||||
|
||||
/**
|
||||
* @param waitForLatest TODO
|
||||
* @return <code>null</code> if the competitor hasn't started this leg yet
|
||||
*/
|
||||
Integer getNumberOfPenaltyCircles(TimePoint timePoint) throws NoWindException;
|
||||
Integer getNumberOfPenaltyCircles(TimePoint timePoint, boolean waitForLatest) throws NoWindException;
|
||||
|
||||
/**
|
||||
* Computes the competitor's rank within this leg. If the competitor has already finished this leg at
|
||||
|
||||
+6
-6
@@ -321,10 +321,10 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor {
|
||||
|
||||
|
||||
@Override
|
||||
public Integer getNumberOfTacks(TimePoint timePoint) throws NoWindException {
|
||||
public Integer getNumberOfTacks(TimePoint timePoint, boolean waitForLatest) throws NoWindException {
|
||||
Integer result = null;
|
||||
if (hasStartedLeg(timePoint)) {
|
||||
List<Maneuver> maneuvers = getManeuvers(timePoint, /* waitForLatest */ true);
|
||||
List<Maneuver> maneuvers = getManeuvers(timePoint, waitForLatest);
|
||||
result = 0;
|
||||
for (Maneuver maneuver : maneuvers) {
|
||||
if (maneuver.getType() == ManeuverType.TACK) {
|
||||
@@ -349,10 +349,10 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getNumberOfJibes(TimePoint timePoint) throws NoWindException {
|
||||
public Integer getNumberOfJibes(TimePoint timePoint, boolean waitForLatest) throws NoWindException {
|
||||
Integer result = null;
|
||||
if (hasStartedLeg(timePoint)) {
|
||||
List<Maneuver> maneuvers = getManeuvers(timePoint, /* waitForLatest */ true);
|
||||
List<Maneuver> maneuvers = getManeuvers(timePoint, waitForLatest);
|
||||
result = 0;
|
||||
for (Maneuver maneuver : maneuvers) {
|
||||
if (maneuver.getType() == ManeuverType.JIBE) {
|
||||
@@ -364,10 +364,10 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getNumberOfPenaltyCircles(TimePoint timePoint) throws NoWindException {
|
||||
public Integer getNumberOfPenaltyCircles(TimePoint timePoint, boolean waitForLatest) throws NoWindException {
|
||||
Integer result = null;
|
||||
if (hasStartedLeg(timePoint)) {
|
||||
List<Maneuver> maneuvers = getManeuvers(timePoint, /* waitForLatest */ true);
|
||||
List<Maneuver> maneuvers = getManeuvers(timePoint, waitForLatest);
|
||||
result = 0;
|
||||
for (Maneuver maneuver : maneuvers) {
|
||||
if (maneuver.getType() == ManeuverType.PENALTY_CIRCLE) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
entryPointModules=
|
||||
filesCopiedToWebInfLib=gwt-servlet.jar
|
||||
gwtCompileSettings=PGd3dC1jb21waWxlLXNldHRpbmdzPjxsb2ctbGV2ZWw+SU5GTzwvbG9nLWxldmVsPjxvdXRwdXQtc3R5bGU+T0JGVVNDQVRFRDwvb3V0cHV0LXN0eWxlPjxleHRyYS1hcmdzPjwhW0NEQVRBWy13YXIgLiAtbG9jYWxXb3JrZXJzIDMgLXN0cmljdCAtbG9nTGV2ZWwgVFJBQ0VdXT48L2V4dHJhLWFyZ3M+PHZtLWFyZ3M+PCFbQ0RBVEFbLVhteDIwMjRtIC1EZ3d0LnVzZWFyY2hpdmVzPWZhbHNlXV0+PC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zYWlsaW5nLmd3dC5Ib21lPC9lbnRyeS1wb2ludC1tb2R1bGU+PGVudHJ5LXBvaW50LW1vZHVsZT5jb20uc2FwLnNhaWxpbmcuZ3d0LnVpLlJhY2VCb2FyZDwvZW50cnktcG9pbnQtbW9kdWxlPjxlbnRyeS1wb2ludC1tb2R1bGU+Y29tLnNhcC5zYWlsaW5nLmd3dC5BdXRvUGxheTwvZW50cnktcG9pbnQtbW9kdWxlPjwvZ3d0LWNvbXBpbGUtc2V0dGluZ3M+
|
||||
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<launchConfiguration type="com.sap.jvm.profiling.ui.launching.OnlineProfilingLaunchConfigurationType">
|
||||
<booleanAttribute key="com.sap.jvm.profiling.ui.widgets.allowDebugging" value="false"/>
|
||||
<booleanAttribute key="com.sap.jvm.profiling.ui.widgets.allowTerminateVm" value="false"/>
|
||||
<stringAttribute key="com.sap.jvm.profiling.ui.widgets.hostName" value="localhost"/>
|
||||
<stringAttribute key="com.sap.jvm.profiling.ui.widgets.port" value="8000"/>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
|
||||
<listEntry value="/com.sap.sailing.gwt.ui"/>
|
||||
</listAttribute>
|
||||
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
|
||||
<listEntry value="4"/>
|
||||
</listAttribute>
|
||||
<booleanAttribute key="org.eclipse.jdt.launching.ALLOW_TERMINATE" value="false"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.server"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_CONNECTOR_ID" value="org.eclipse.jdt.launching.socketAttachConnector"/>
|
||||
<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%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_TENANT_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ADAPTIVE%CTX_KEY%false%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-IO_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_TENANT_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-METHOD_PARAMETER_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_TENANT_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-NETWORK_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_RESOLVE_ALL_HOSTS%CTX_KEY%true%CTX_ENTRY%KEY_TENANT_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-PERFORMANCE_HOTSPOT_TRACE" value="KEY_IGNORE_SLEEPING_THREADS%CTX_KEY%false%CTX_ENTRY%KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%true%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_TENANT_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
<stringAttribute key="profilingTraceType-SYNCHRONIZATION_TRACE" value="KEY_APPLICATION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_SESSION_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_ENABLEMENT%CTX_KEY%false%CTX_ENTRY%KEY_USER_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_REQUEST_FILTER%CTX_KEY%*%CTX_ENTRY%KEY_TENANT_FILTER%CTX_KEY%*%CTX_ENTRY%"/>
|
||||
</launchConfiguration>
|
||||
-53
@@ -1,53 +0,0 @@
|
||||
package com.sap.sailing.gwt.ui.adminconsole;
|
||||
|
||||
public enum BoatTypes {
|
||||
RS_X ("RS:X"),
|
||||
RS_XY ("RS:X-Y"),
|
||||
LASER ("Laser"),
|
||||
LASER_RADIAL ("Laser Radial"),
|
||||
LASER_SB3 ("Laser SB3"),
|
||||
FINN ("Finn"),
|
||||
EUROPE ("Europe"),
|
||||
A_CAT ("A-Cat"),
|
||||
CONTENDER ("Contender"),
|
||||
STAR ("Star"),
|
||||
OK_DINGHY ("OK-Dinghy"),
|
||||
FLYING_DUTCHMAN ("Flying Dutchman"),
|
||||
FOLKEBOOT ("Folkeboot"),
|
||||
FORMULA ("Formula"),
|
||||
H_BOOT ("H-Boot"),
|
||||
HOBIE ("Hobie"),
|
||||
CLASS_420 ("420"),
|
||||
CLASS_470 ("470"),
|
||||
CLASS_505 ("505"),
|
||||
CLASS_29er("29er"),
|
||||
CLASS_49er("49er"),
|
||||
CLASS_24mR("2.4mR open"),
|
||||
CLASS_J_24 ("J-24"),
|
||||
CLASS_X_35 ("X-35"),
|
||||
CLASS_X_99 ("X-99"),
|
||||
SWAN_45 ("Swan-45"),
|
||||
ORC_I ("ORC I"),
|
||||
ORC_II ("ORC II"),
|
||||
ORC_III ("ORC II"),
|
||||
ORC_IV ("ORC IV"),
|
||||
MULTIHALL ("Multihull"),
|
||||
ALBIN_BALLAD ("Albin Ballad"),
|
||||
ALBIN_EXPRESS ("Albin Express"),
|
||||
CB66 ("CB66"),
|
||||
J_80 ("J/80"),
|
||||
MELGES24 ("Melges 24"),
|
||||
PLATU25 ("Platu25"),
|
||||
STREAMLINE ("Steamline"),
|
||||
ANY_CLASS ("Any class");
|
||||
|
||||
private String name;
|
||||
|
||||
BoatTypes(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -10,6 +10,7 @@ import com.google.gwt.user.client.ui.Label;
|
||||
import com.google.gwt.user.client.ui.ListBox;
|
||||
import com.google.gwt.user.client.ui.TextBox;
|
||||
import com.google.gwt.user.client.ui.Widget;
|
||||
import com.sap.sailing.domain.common.BoatClassMasterdata;
|
||||
import com.sap.sailing.domain.common.Color;
|
||||
import com.sap.sailing.domain.common.CountryCode;
|
||||
import com.sap.sailing.domain.common.CountryCodeFactory;
|
||||
@@ -67,8 +68,8 @@ public class CompetitorEditDialog extends DataEntryDialog<CompetitorDTO> {
|
||||
this.boatClassName = createListBox(/* isMultipleSelect */ false);
|
||||
int i=0;
|
||||
List<String> boatClassNamesList = new ArrayList<String>();
|
||||
for (BoatTypes t : BoatTypes.values()) {
|
||||
boatClassNamesList.add(t.getName());
|
||||
for (BoatClassMasterdata t : BoatClassMasterdata.values()) {
|
||||
boatClassNamesList.add(t.getDisplayName());
|
||||
}
|
||||
String competitorsBoatClassName = competitorToEdit.getBoatClass() != null ? competitorToEdit.getBoatClass().getName() : null;
|
||||
Collections.sort(boatClassNamesList);
|
||||
|
||||
+57
-44
@@ -134,7 +134,13 @@ public class RegattasResource extends AbstractSailingServerResource {
|
||||
|
||||
/**
|
||||
* Gets all GPS positions of the competitors for a given race.
|
||||
* @param regattaName the name of the regatta
|
||||
*
|
||||
* @param regattaName
|
||||
* the name of the regatta
|
||||
* @param tack
|
||||
* whether or not to include the tack in the output for each fix. Determining tack requires an expensive
|
||||
* wind calculation for the competitor's position for each fix's time point. If this value is not
|
||||
* absolutely required, <code>false</code> should be provided here which is also the default.
|
||||
* @return
|
||||
*/
|
||||
@GET
|
||||
@@ -142,7 +148,8 @@ public class RegattasResource extends AbstractSailingServerResource {
|
||||
@Path("{regattaname}/races/{racename}/competitors/positions")
|
||||
public Response getCompetitorPositions(@PathParam("regattaname") String regattaName, @PathParam("racename") String raceName,
|
||||
@QueryParam("fromtime") String fromtime, @QueryParam("fromtimeasmillis") Long fromtimeasmillis,
|
||||
@QueryParam("totime") String totime, @QueryParam("totimeasmillis") Long totimeasmillis) {
|
||||
@QueryParam("totime") String totime, @QueryParam("totimeasmillis") Long totimeasmillis, @QueryParam("withtack") Boolean withTack,
|
||||
@QueryParam("competitorId") Set<String> competitorIds) {
|
||||
Response response;
|
||||
Regatta regatta = findRegattaByName(regattaName);
|
||||
if (regatta == null) {
|
||||
@@ -174,50 +181,56 @@ public class RegattasResource extends AbstractSailingServerResource {
|
||||
jsonRace.put("regatta", regatta.getName());
|
||||
JSONArray jsonCompetitors = new JSONArray();
|
||||
for (Competitor competitor : trackedRace.getRace().getCompetitors()) {
|
||||
JSONObject jsonCompetitor = new JSONObject();
|
||||
jsonCompetitor.put("id", competitor.getId() != null ? competitor.getId().toString() : null);
|
||||
jsonCompetitor.put("name", competitor.getName());
|
||||
jsonCompetitor.put("sailNumber", competitor.getBoat().getSailID());
|
||||
jsonCompetitor.put("color", competitor.getColor() != null ? competitor.getColor().getAsHtml() : null);
|
||||
|
||||
GPSFixTrack<Competitor, GPSFixMoving> track = trackedRace.getTrack(competitor);
|
||||
JSONArray jsonFixes = new JSONArray();
|
||||
track.lockForRead();
|
||||
try {
|
||||
Iterator<GPSFixMoving> fixIter;
|
||||
if (from == null) {
|
||||
fixIter = track.getFixes().iterator();
|
||||
} else {
|
||||
fixIter = track.getFixesIterator(from, /* inclusive */true);
|
||||
}
|
||||
while (fixIter.hasNext()) {
|
||||
GPSFixMoving fix = fixIter.next();
|
||||
if (to != null && fix.getTimePoint() != null && to.compareTo(fix.getTimePoint()) < 0) {
|
||||
break;
|
||||
if (competitorIds == null || competitorIds.isEmpty() || competitorIds.contains(competitor.getId().toString())) {
|
||||
JSONObject jsonCompetitor = new JSONObject();
|
||||
jsonCompetitor.put("id", competitor.getId() != null ? competitor.getId().toString() : null);
|
||||
jsonCompetitor.put("name", competitor.getName());
|
||||
jsonCompetitor.put("sailNumber", competitor.getBoat().getSailID());
|
||||
jsonCompetitor.put("color", competitor.getColor() != null ? competitor.getColor().getAsHtml() : null);
|
||||
GPSFixTrack<Competitor, GPSFixMoving> track = trackedRace.getTrack(competitor);
|
||||
JSONArray jsonFixes = new JSONArray();
|
||||
track.lockForRead();
|
||||
try {
|
||||
Iterator<GPSFixMoving> fixIter;
|
||||
if (from == null) {
|
||||
fixIter = track.getFixes().iterator();
|
||||
} else {
|
||||
fixIter = track.getFixesIterator(from, /* inclusive */true);
|
||||
}
|
||||
JSONObject jsonFix = new JSONObject();
|
||||
jsonFix.put("timepoint-ms", fix.getTimePoint().asMillis());
|
||||
jsonFix.put("lat-deg", UnitSerializationUtil.latLngDecimalFormatter.format(fix.getPosition().getLatDeg()));
|
||||
jsonFix.put("lng-deg", UnitSerializationUtil.latLngDecimalFormatter.format(fix.getPosition().getLngDeg()));
|
||||
jsonFix.put("truebearing-deg", fix.getSpeed().getBearing().getDegrees());
|
||||
jsonFix.put("speed-kts", UnitSerializationUtil.knotsDecimalFormatter.format(fix.getSpeed().getKnots()));
|
||||
String tackName;
|
||||
try {
|
||||
final Tack tack = trackedRace.getTack(competitor, fix.getTimePoint());
|
||||
if (tack != null) {
|
||||
tackName = tack.name();
|
||||
jsonFix.put("tack", tackName);
|
||||
while (fixIter.hasNext()) {
|
||||
GPSFixMoving fix = fixIter.next();
|
||||
if (to != null && fix.getTimePoint() != null && to.compareTo(fix.getTimePoint()) < 0) {
|
||||
break;
|
||||
}
|
||||
} catch (NoWindException e) {
|
||||
// don't output tack
|
||||
JSONObject jsonFix = new JSONObject();
|
||||
jsonFix.put("timepoint-ms", fix.getTimePoint().asMillis());
|
||||
jsonFix.put("lat-deg", UnitSerializationUtil.latLngDecimalFormatter.format(fix
|
||||
.getPosition().getLatDeg()));
|
||||
jsonFix.put("lng-deg", UnitSerializationUtil.latLngDecimalFormatter.format(fix
|
||||
.getPosition().getLngDeg()));
|
||||
jsonFix.put("truebearing-deg", fix.getSpeed().getBearing().getDegrees());
|
||||
jsonFix.put("speed-kts",
|
||||
UnitSerializationUtil.knotsDecimalFormatter.format(fix.getSpeed().getKnots()));
|
||||
if (withTack != null && withTack) {
|
||||
String tackName;
|
||||
try {
|
||||
final Tack tack = trackedRace.getTack(competitor, fix.getTimePoint());
|
||||
if (tack != null) {
|
||||
tackName = tack.name();
|
||||
jsonFix.put("tack", tackName);
|
||||
}
|
||||
} catch (NoWindException e) {
|
||||
// don't output tack
|
||||
}
|
||||
}
|
||||
jsonFixes.add(jsonFix);
|
||||
}
|
||||
jsonFixes.add(jsonFix);
|
||||
} finally {
|
||||
track.unlockAfterRead();
|
||||
}
|
||||
} finally {
|
||||
track.unlockAfterRead();
|
||||
jsonCompetitor.put("track", jsonFixes);
|
||||
jsonCompetitors.add(jsonCompetitor);
|
||||
}
|
||||
jsonCompetitor.put("track", jsonFixes);
|
||||
jsonCompetitors.add(jsonCompetitor);
|
||||
}
|
||||
jsonRace.put("competitors", jsonCompetitors);
|
||||
|
||||
@@ -598,10 +611,10 @@ public class RegattasResource extends AbstractSailingServerResource {
|
||||
jsonCompetitorInLeg.put("averageSOG-kts", UnitSerializationUtil.knotsDecimalFormatter.format(averageSpeedOverGround.getKnots()));
|
||||
}
|
||||
try {
|
||||
Integer numberOfTacks = trackedLegOfCompetitor.getNumberOfTacks(timePoint);
|
||||
Integer numberOfJibes = trackedLegOfCompetitor.getNumberOfJibes(timePoint);
|
||||
Integer numberOfTacks = trackedLegOfCompetitor.getNumberOfTacks(timePoint, /* waitForLatest */ false);
|
||||
Integer numberOfJibes = trackedLegOfCompetitor.getNumberOfJibes(timePoint, /* waitForLatest */ false);
|
||||
Integer numberOfPenaltyCircles = trackedLegOfCompetitor
|
||||
.getNumberOfPenaltyCircles(timePoint);
|
||||
.getNumberOfPenaltyCircles(timePoint, /* waitForLatest */ false);
|
||||
jsonCompetitorInLeg.put("tacks", numberOfTacks);
|
||||
jsonCompetitorInLeg.put("jibes", numberOfJibes);
|
||||
jsonCompetitorInLeg.put("penaltyCircles", numberOfPenaltyCircles);
|
||||
|
||||
+2
@@ -34,6 +34,8 @@
|
||||
<div>fromtimeasmillis</div>
|
||||
<div>totime (ISO format, such as 2014-02-14T10:12:03Z)</div>
|
||||
<div>totimeasmillis</div>
|
||||
<div>withtack ("true" or "false"; default is "false"; "true" adds the tack to each fix which is expensive to calculate)</div>
|
||||
<div>competitorId (one or more competitor IDs; for multiple competitors, provide the parameter multiple times; by default, positions of all competitors will be provided)</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
+1
@@ -290,6 +290,7 @@ public abstract class AbstractServerReplicationTest {
|
||||
}
|
||||
}.start();
|
||||
ObjectInputStream dis = resolveAgainst.createObjectInputStreamResolvingAgainstThisFactory(pis);
|
||||
getRacingEventService().clearReplicaState();
|
||||
getRacingEventService().initiallyFillFrom(dis);
|
||||
dis.close();
|
||||
}
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ public class ReplicationMasterDescriptorImpl implements ReplicationMasterDescrip
|
||||
// make sure to remove queue in order to avoid any exchanges filling it with messages
|
||||
consumer.getChannel().queueUnbind(queueName, exchangeName, "");
|
||||
consumer.getChannel().queueDelete(queueName);
|
||||
consumer.getChannel().getConnection().close(1);
|
||||
consumer.getChannel().getConnection().close(/* timeout in millis */ 1000);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
// ignore any exception during abort. close can yield a broad
|
||||
|
||||
+3
-1
@@ -428,13 +428,15 @@ public class ReplicationServiceImpl implements ReplicationService, OperationExec
|
||||
replicator = new Replicator(master, this, /* startSuspended */ true, consumer, getRacingEventService().getBaseDomainFactory());
|
||||
// start receiving messages already now, but start in suspended mode
|
||||
replicatorThread = new Thread(replicator, "Replicator receiving from "+master.getMessagingHostname()+"/"+master.getExchangeName());
|
||||
final RacingEventService racingEventService = getRacingEventService();
|
||||
// clear racingEventService state here, before starting to receive and de-serialized operations which builds up new state, e.g., in competitor store
|
||||
racingEventService.clearReplicaState(); // see also bug 2437
|
||||
replicatorThread.start();
|
||||
logger.info("Started replicator thread");
|
||||
InputStream is = initialLoadURL.openStream();
|
||||
final String queueName = new BufferedReader(new InputStreamReader(is)).readLine();
|
||||
try {
|
||||
RabbitInputStreamProvider rabbitInputStreamProvider = new RabbitInputStreamProvider(master.createChannel(), queueName);
|
||||
final RacingEventService racingEventService = getRacingEventService();
|
||||
ObjectInputStream ois = racingEventService.getBaseDomainFactory()
|
||||
.createObjectInputStreamResolvingAgainstThisFactory(
|
||||
new GZIPInputStream(rabbitInputStreamProvider.getInputStream()));
|
||||
|
||||
@@ -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.8"/>
|
||||
<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 -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.VM_ARGUMENTS" value="-ea -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dfile.encoding=cp1252 -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 -Dmongo.host=172.31.25.253 -Dmongo.port=10200 -Dmongo.dbName=LOAD_TEST"/>
|
||||
<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%"/>
|
||||
|
||||
Regular → Executable
+5
-4
@@ -15,15 +15,16 @@
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
|
||||
<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
|
||||
</listAttribute>
|
||||
<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.8"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/sapjvm_8"/>
|
||||
<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="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Xmx2048m -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 -XX:+UseMembar"/>
|
||||
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y -ea -Declipse.ignoreApp=true -Dosgi.noShutdown=true -Dfile.encoding=cp1252 -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 -Dmongo.host=172.31.25.253 -Dmongo.port=10200 -Dmongo.dbName=LOAD_TEST"/>
|
||||
<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"/>
|
||||
<stringAttribute key="target_bundles" value="com.rabbitmq.client@default:default,com.sun.jersey@default:default,com.sun.mail.javax.mail@default:default,javax.servlet@default:default,javax.validation@default:default,javax.ws.rs@default:default,jcl.over.slf4j@default:default,org.apache.activemq.activeio-core@default:default,org.apache.activemq.activemq-core@default:default,org.apache.activemq.kahadb@default:default,org.apache.commons.codec@default:default,org.apache.commons.fileupload@default:default,org.apache.commons.io@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.geronimo.specs.geronimo-annotation_1.0_spec@default:default,org.apache.geronimo.specs.geronimo-j2ee-management_1.1_spec@default:default,org.apache.geronimo.specs.geronimo-jms_1.1_spec@default:default,org.apache.httpcomponents.httpclient@default:default,org.apache.httpcomponents.httpcore@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.deploy@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.jmx@default:default,org.eclipse.jetty.osgi.boot@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jetty.webapp@default:default,org.eclipse.jetty.websocket.api@default:default,org.eclipse.jetty.websocket.client@default:default,org.eclipse.jetty.websocket.common@default:default,org.eclipse.jetty.websocket.server@default:default,org.eclipse.jetty.websocket.servlet@default:default,org.eclipse.jetty.xml@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hyperic.sigar@default:default,org.jdom@default:default,org.objectweb.asm@default:default,rome@default:default,routeconverter@default:default,slf4j.api@default:default,slf4j.jdk14@default:false"/>
|
||||
<stringAttribute key="target_bundles" value="com.rabbitmq.client@default:default,com.sun.jersey@default:default,com.sun.mail.javax.mail@default:default,javax.servlet@default:default,javax.validation@default:default,javax.ws.rs@default:default,jcl.over.slf4j@default:default,org.apache.activemq.activeio-core@default:default,org.apache.activemq.activemq-core@default:default,org.apache.activemq.kahadb@default:default,org.apache.commons.codec@default:default,org.apache.commons.fileupload@default:default,org.apache.commons.io@default:default,org.apache.commons.lang@default:default,org.apache.commons.logging@default:default,org.apache.felix.gogo.command@default:default,org.apache.felix.gogo.runtime@default:default,org.apache.felix.gogo.shell@default:default,org.apache.felix.shell.remote@default:default,org.apache.felix.shell@default:default,org.apache.geronimo.specs.geronimo-annotation_1.0_spec@default:default,org.apache.geronimo.specs.geronimo-j2ee-management_1.1_spec@default:default,org.apache.geronimo.specs.geronimo-jms_1.1_spec@default:default,org.apache.httpcomponents.httpclient@default:default,org.apache.httpcomponents.httpcore@default:default,org.eclipse.equinox.common@2:true,org.eclipse.equinox.console@default:default,org.eclipse.equinox.util@default:default,org.eclipse.jetty.continuation@default:default,org.eclipse.jetty.deploy@default:default,org.eclipse.jetty.http@default:default,org.eclipse.jetty.io@default:default,org.eclipse.jetty.jmx@default:default,org.eclipse.jetty.osgi.boot@default:default,org.eclipse.jetty.security@default:default,org.eclipse.jetty.server@default:default,org.eclipse.jetty.servlet@default:default,org.eclipse.jetty.util@default:default,org.eclipse.jetty.webapp@default:default,org.eclipse.jetty.websocket.api@default:default,org.eclipse.jetty.websocket.client@default:default,org.eclipse.jetty.websocket.common@default:default,org.eclipse.jetty.websocket.server@default:default,org.eclipse.jetty.websocket.servlet@default:default,org.eclipse.jetty.xml@default:default,org.eclipse.osgi.services@default:default,org.eclipse.osgi@-1:true,org.hyperic.sigar@default:default,org.jdom@default:default,org.objectweb.asm@default:default,rome@default:default,routeconverter@default:default,slf4j.api@default:default,slf4j.jdk14@default:false"/>
|
||||
<booleanAttribute key="tracing" value="false"/>
|
||||
<booleanAttribute key="useCustomFeatures" value="false"/>
|
||||
<booleanAttribute key="useDefaultConfigArea" value="false"/>
|
||||
<stringAttribute key="workspace_bundles" value="com.google.gwt.osgi@default:default,com.googlecode.java-diff-utils@default:default,com.mongodb.driver@default:default,com.sap.sailing.barbados.resultimport@default:default,com.sap.sailing.datamining.shared@default:default,com.sap.sailing.datamining@default:default,com.sap.sailing.declination@default:default,com.sap.sailing.domain.common@default:default,com.sap.sailing.domain.deckmanadapter@4:true,com.sap.sailing.domain.igtimiadapter.persistence@default:default,com.sap.sailing.domain.igtimiadapter@default:default,com.sap.sailing.domain.persistence@default:default,com.sap.sailing.domain.racelogtrackingadapter@3:true,com.sap.sailing.domain.shared.android@default:default,com.sap.sailing.domain.swisstimingadapter.persistence@default:default,com.sap.sailing.domain.swisstimingadapter@5:true,com.sap.sailing.domain.swisstimingreplayadapter@5:true,com.sap.sailing.domain.tractracadapter.persistence@default:default,com.sap.sailing.domain.tractracadapter@5:true,com.sap.sailing.domain@default:default,com.sap.sailing.ess40.resultimport@default:default,com.sap.sailing.expeditionconnector@default:default,com.sap.sailing.freg.resultimport@default:default,com.sap.sailing.geocoding@default:default,com.sap.sailing.gwt.ui@default:default,com.sap.sailing.kiworesultimport@default:default,com.sap.sailing.manage2sail.resultimport@default:default,com.sap.sailing.manage2sail@default:default,com.sap.sailing.mongodb@default:default,com.sap.sailing.monitoring@default:default,com.sap.sailing.nmeaconnector@default:default,com.sap.sailing.operationaltransformation@default:default,com.sap.sailing.polars@default:default,com.sap.sailing.sailwave.resultimport@default:default,com.sap.sailing.server.gateway.ess40@default:default,com.sap.sailing.server.gateway.serialization@default:default,com.sap.sailing.server.gateway@default:default,com.sap.sailing.server.replication@default:default,com.sap.sailing.server.trackfiles@default:default,com.sap.sailing.server@default:default,com.sap.sailing.simulator@default:default,com.sap.sailing.udpconnector@default:default,com.sap.sailing.velum.resultimport@default:default,com.sap.sailing.www.events@default:default,com.sap.sailing.www@default:default,com.sap.sailing.xrr.resultimport@default:default,com.sap.sse.common@default:default,com.sap.sse.datamining.shared@default:default,com.sap.sse.datamining@default:default,com.sap.sse.gwt@default:default,com.tractrac.clientmodule@default:default,net.sf.marineapi@default:default,org.json.simple@default:default,org.moxieapps.gwt.highcharts@default:default"/>
|
||||
<stringAttribute key="workspace_bundles" value="com.google.gwt.osgi@default:default,com.googlecode.java-diff-utils@default:default,com.mongodb.driver@default:default,com.sap.sailing.barbados.resultimport@default:default,com.sap.sailing.datamining.shared@default:default,com.sap.sailing.datamining@default:default,com.sap.sailing.declination@default:default,com.sap.sailing.domain.common@default:default,com.sap.sailing.domain.deckmanadapter@4:true,com.sap.sailing.domain.igtimiadapter.persistence@default:default,com.sap.sailing.domain.igtimiadapter@default:default,com.sap.sailing.domain.persistence@default:default,com.sap.sailing.domain.racelogtrackingadapter@3:true,com.sap.sailing.domain.shared.android@default:default,com.sap.sailing.domain.swisstimingadapter.persistence@default:default,com.sap.sailing.domain.swisstimingadapter@5:true,com.sap.sailing.domain.swisstimingreplayadapter@5:true,com.sap.sailing.domain.tractracadapter.persistence@default:default,com.sap.sailing.domain.tractracadapter@5:true,com.sap.sailing.domain@default:default,com.sap.sailing.ess40.resultimport@default:default,com.sap.sailing.expeditionconnector@default:default,com.sap.sailing.freg.resultimport@default:default,com.sap.sailing.geocoding@default:default,com.sap.sailing.gwt.ui@default:default,com.sap.sailing.kiworesultimport@default:default,com.sap.sailing.manage2sail.resultimport@default:default,com.sap.sailing.manage2sail@default:default,com.sap.sailing.mongodb@default:default,com.sap.sailing.monitoring@default:default,com.sap.sailing.nmeaconnector@default:default,com.sap.sailing.operationaltransformation@default:default,com.sap.sailing.resultimport@default:default,com.sap.sailing.polars@default:default,com.sap.sailing.sailwave.resultimport@default:default,com.sap.sailing.server.gateway.ess40@default:default,com.sap.sailing.server.gateway.serialization@default:default,com.sap.sailing.server.gateway@default:default,com.sap.sailing.server.replication@default:default,com.sap.sailing.server.trackfiles@default:default,com.sap.sailing.server@default:default,com.sap.sailing.simulator@default:default,com.sap.sailing.udpconnector@default:default,com.sap.sailing.velum.resultimport@default:default,com.sap.sailing.www.events@default:default,com.sap.sailing.www@default:default,com.sap.sailing.xrr.resultimport@default:default,com.sap.sse.common@default:default,com.sap.sse.datamining.shared@default:default,com.sap.sse.datamining@default:default,com.sap.sse.gwt@default:default,com.tractrac.clientmodule@default:default,net.sf.marineapi@default:default,org.json.simple@default:default,org.moxieapps.gwt.highcharts@default:default"/>
|
||||
</launchConfiguration>
|
||||
@@ -312,6 +312,17 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
*/
|
||||
void serializeForInitialReplication(ObjectOutputStream oos) throws IOException;
|
||||
|
||||
/**
|
||||
* Before {@link #initiallyFillFrom(ObjectInputStream) initially loading a replica's state from a master instance},
|
||||
* the replica's old state needs to be "detached". This method clears all top-level data structures and stops all
|
||||
* tracking currently going on.<p>
|
||||
*
|
||||
* The reason this operation needs to be callable separate from {@link #initiallyFillFrom(ObjectInputStream)} is that
|
||||
* it needs to happen before subscribing to the operation feed received from the master instance through the message bus
|
||||
* which in turn needs to happen before receiving the initial load.
|
||||
*/
|
||||
void clearReplicaState() throws MalformedURLException, IOException, InterruptedException;
|
||||
|
||||
/**
|
||||
* Dual, reading operation for {@link #serializeForInitialReplication(ObjectOutputStream)}. In other words, when
|
||||
* this operation returns, this service instance is in a state "equivalent" to that of the service instance that
|
||||
@@ -325,8 +336,8 @@ public interface RacingEventService extends TrackedRegattaRegistry, RegattaFetch
|
||||
* to the default leaderboard and for automatic linking to leaderboard columns. It is assumed that no explicit
|
||||
* replication of these operations will happen based on the changes performed on the replication master.<p>
|
||||
*
|
||||
* <b>Caution:</b> All relevant contents of this service instance will be replaced by the stream contents.
|
||||
* @throws InterruptedException
|
||||
* <b>Caution:</b> All relevant contents of this service instance needs to be cleared before by a call to
|
||||
* {@link #clearReplicaState()}. It will be replaced by the stream contents.
|
||||
*/
|
||||
void initiallyFillFrom(ObjectInputStream ois) throws IOException, ClassNotFoundException, InterruptedException;
|
||||
|
||||
|
||||
+50
-49
@@ -2249,7 +2249,7 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
logger.info(logoutput.toString());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings("unchecked") // all the casts of ois.readObject()'s return value to Map<..., ...>
|
||||
// the type-parameters in the casts of the de-serialized collection objects can't be checked
|
||||
@Override
|
||||
public void initiallyFillFrom(ObjectInputStream ois) throws IOException, ClassNotFoundException,
|
||||
@@ -2261,55 +2261,7 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
// de-serialization; this will cause all classes to be visible that this bundle
|
||||
// (com.sap.sailing.server) can see
|
||||
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
|
||||
LockUtil.lockForWrite(regattasByNameLock);
|
||||
try {
|
||||
regattasByName.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(regattasByNameLock);
|
||||
}
|
||||
regattasObservedForDefaultLeaderboard.clear();
|
||||
|
||||
if (raceTrackersByRegatta != null && !raceTrackersByRegatta.isEmpty()) {
|
||||
for (DynamicTrackedRegatta regatta : regattaTrackingCache.values()) {
|
||||
for (RaceTracker tracker : raceTrackersByRegatta.get(regatta)) {
|
||||
tracker.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("Clearing all data structures...");
|
||||
LockUtil.lockForWrite(regattaTrackingCacheLock);
|
||||
try {
|
||||
regattaTrackingCache.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(regattaTrackingCacheLock);
|
||||
}
|
||||
LockUtil.lockForWrite(raceTrackersByRegattaLock);
|
||||
try {
|
||||
raceTrackersByRegatta.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(raceTrackersByRegattaLock);
|
||||
}
|
||||
LockUtil.lockForWrite(leaderboardGroupsByNameLock);
|
||||
try {
|
||||
leaderboardGroupsByName.clear();
|
||||
leaderboardGroupsByID.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(leaderboardGroupsByNameLock);
|
||||
}
|
||||
LockUtil.lockForWrite(leaderboardsByNameLock);
|
||||
try {
|
||||
leaderboardsByName.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(leaderboardsByNameLock);
|
||||
}
|
||||
eventsById.clear();
|
||||
mediaLibrary.clear();
|
||||
competitorStore.clear();
|
||||
remoteSailingServerSet.clear();
|
||||
|
||||
StringBuffer logoutput = new StringBuffer();
|
||||
|
||||
logger.info("Reading all events...");
|
||||
eventsById.putAll((Map<Serializable, Event>) ois.readObject());
|
||||
logoutput.append("\nReceived " + eventsById.size() + " NEW events\n");
|
||||
@@ -2401,6 +2353,55 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearReplicaState() throws MalformedURLException, IOException, InterruptedException {
|
||||
logger.info("Clearing all data structures...");
|
||||
LockUtil.lockForWrite(regattasByNameLock);
|
||||
try {
|
||||
regattasByName.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(regattasByNameLock);
|
||||
}
|
||||
regattasObservedForDefaultLeaderboard.clear();
|
||||
|
||||
if (raceTrackersByRegatta != null && !raceTrackersByRegatta.isEmpty()) {
|
||||
for (DynamicTrackedRegatta regatta : regattaTrackingCache.values()) {
|
||||
for (RaceTracker tracker : raceTrackersByRegatta.get(regatta)) {
|
||||
tracker.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
LockUtil.lockForWrite(regattaTrackingCacheLock);
|
||||
try {
|
||||
regattaTrackingCache.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(regattaTrackingCacheLock);
|
||||
}
|
||||
LockUtil.lockForWrite(raceTrackersByRegattaLock);
|
||||
try {
|
||||
raceTrackersByRegatta.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(raceTrackersByRegattaLock);
|
||||
}
|
||||
LockUtil.lockForWrite(leaderboardGroupsByNameLock);
|
||||
try {
|
||||
leaderboardGroupsByName.clear();
|
||||
leaderboardGroupsByID.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(leaderboardGroupsByNameLock);
|
||||
}
|
||||
LockUtil.lockForWrite(leaderboardsByNameLock);
|
||||
try {
|
||||
leaderboardsByName.clear();
|
||||
} finally {
|
||||
LockUtil.unlockAfterWrite(leaderboardsByNameLock);
|
||||
}
|
||||
eventsById.clear();
|
||||
mediaLibrary.clear();
|
||||
competitorStore.clear();
|
||||
remoteSailingServerSet.clear();
|
||||
}
|
||||
|
||||
// Used for TESTING only
|
||||
@Override
|
||||
public Event addEvent(String eventName, String eventDescription, TimePoint startDate, TimePoint endDate,
|
||||
|
||||
@@ -652,9 +652,9 @@ public class LeaderboardData extends ExportAction {
|
||||
addNamedElementWithValue(competitorLegDataElement, "distance_traveled_in_meters", competitorLeg.getDistanceTraveled(legFinishTime).getMeters());
|
||||
addNamedElementWithValue(competitorLegDataElement, "average_speed_over_ground_in_knots", competitorLeg.getAverageSpeedOverGround(legFinishTime).getKnots());
|
||||
|
||||
addNamedElementWithValue(competitorLegDataElement, "number_of_jibes", competitorLeg.getNumberOfJibes(legFinishTime));
|
||||
addNamedElementWithValue(competitorLegDataElement, "number_of_tacks", competitorLeg.getNumberOfTacks(legFinishTime));
|
||||
addNamedElementWithValue(competitorLegDataElement, "number_of_penalty_circles", competitorLeg.getNumberOfPenaltyCircles(legFinishTime));
|
||||
addNamedElementWithValue(competitorLegDataElement, "number_of_jibes", competitorLeg.getNumberOfJibes(legFinishTime, /* waitForLatest */ false));
|
||||
addNamedElementWithValue(competitorLegDataElement, "number_of_tacks", competitorLeg.getNumberOfTacks(legFinishTime, /* waitForLatest */ false));
|
||||
addNamedElementWithValue(competitorLegDataElement, "number_of_penalty_circles", competitorLeg.getNumberOfPenaltyCircles(legFinishTime, /* waitForLatest */ false));
|
||||
|
||||
addNamedElementWithValue(competitorLegDataElement, "leg_rank_at_leg_start", competitorLeg.getRank(competitorLeg.getStartTime()));
|
||||
addNamedElementWithValue(competitorLegDataElement, "leg_rank_at_leg_finish", competitorLeg.getRank(legFinishTime));
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="com.google.gwt.eclipse.core.GWT_CONTAINER"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry excluding="com/sap/sse/gwt/jre/" kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
@@ -2,7 +2,7 @@ eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.7
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
|
||||
@@ -4,7 +4,7 @@ Bundle-Name: Shared GWT Code
|
||||
Bundle-SymbolicName: com.sap.sse.gwt
|
||||
Bundle-Version: 1.0.0.qualifier
|
||||
Bundle-Vendor: SAP
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Require-Bundle: com.google.gwt.osgi;bundle-version="2.6.0",
|
||||
com.sap.sse.common;bundle-version="1.0.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
@@ -19,6 +19,7 @@ Export-Package: com.sap.sse.gwt.client,
|
||||
com.sap.sse.gwt.client.async,
|
||||
com.sap.sse.gwt.client.controls,
|
||||
com.sap.sse.gwt.client.controls.busyindicator,
|
||||
com.sap.sse.gwt.client.controls.listedit,
|
||||
com.sap.sse.gwt.client.controls.slider,
|
||||
com.sap.sse.gwt.client.dialog,
|
||||
com.sap.sse.gwt.client.event,
|
||||
|
||||
@@ -17,6 +17,9 @@ java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
|
||||
|
||||
# Overwrite the log leves for specific loggers here
|
||||
com.sap.sailing.level = FINE
|
||||
# log at level FINEST for TransientCompetitorStoreIMpl
|
||||
#com.sap.sailing.domain.base.impl.TransientCompetitorStoreImpl.level = FINEST
|
||||
#com.sap.sailing.domain.base.impl.SharedDomainFactoryImpl.level = FINEST
|
||||
org.eclipse.jetty.level = INFO
|
||||
org.apache.activemq.level = INFO
|
||||
|
||||
|
||||
Reference in new issue
Block a user