mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-02 18:33:54 +00:00
Bug 2059: Added Track.size method to get the number of fixes without the
need to old a read lock
This commit is contained in:
1 parent
6553b90c0a
commit
2bd0d0907c
3 files changed
+15
No files matched your search
+5
@@ -250,4 +250,9 @@ public class NoAddingRaceLogWrapper implements RaceLog {
|
||||
public void revokeEvent(AbstractLogEventAuthor author, RaceLogEvent toRevoke) throws NotRevokableException {
|
||||
innerRaceLog.revokeEvent(author, toRevoke);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return innerRaceLog.size();
|
||||
}
|
||||
}
|
||||
+5
@@ -184,4 +184,9 @@ public interface Track<FixType extends Timed> extends Serializable {
|
||||
* more than one raw fix in the track
|
||||
*/
|
||||
Duration getAverageIntervalBetweenRawFixes();
|
||||
|
||||
/**
|
||||
* @return the number of raw fixes contained in the Track.
|
||||
*/
|
||||
int size();
|
||||
}
|
||||
+5
@@ -378,4 +378,9 @@ public class TrackImpl<FixType extends Timed> implements Track<FixType> {
|
||||
unlockAfterRead();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int size() {
|
||||
return fixes.size();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user