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:
Steffen Schaefer committed 2017-07-11 10:34:18 +02:00
1 parent 6553b90c0a
commit 2bd0d0907c
3 files changed
+15

No files matched your search

@@ -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();
}
}
@@ -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();
}
@@ -378,4 +378,9 @@ public class TrackImpl<FixType extends Timed> implements Track<FixType> {
unlockAfterRead();
}
}
@Override
public int size() {
return fixes.size();
}
}