formatting changes only

Change-Id: I43c8bf3de168ffe02e2bb1d05a6b89c387969151
This commit is contained in:
Axel Uhl committed 2016-06-03 12:04:57 +02:00
1 parent 341086ff54
commit 337ce15ef1
1 file changed
+1 -22
@@ -34,28 +34,9 @@ class MediaLibrary {
* result in case a MediaTrack is being removed from the library or changes values such that it needs to be removed
* from the cache.
*/
private final ConcurrentMap<RegattaAndRaceIdentifier, Set<MediaTrack>> mediaTracksByRace = new ConcurrentHashMap<RegattaAndRaceIdentifier, Set<MediaTrack>>();
private final NamedReentrantReadWriteLock lock = new NamedReentrantReadWriteLock(MediaLibrary.class.getName(), /* fair */
false);
// /**
// * Sort in reverse order of start time! For equal start times compare dbId to distinguish different instances.
// */
// private static final Comparator<MediaTrack> COMPARATOR_BY_REVERSE_STARTTIME = new Comparator<MediaTrack>() {
//
// @Override
// public int compare(MediaTrack mediaTrack1, MediaTrack mediaTrack2) {
// int result = compareDatesAllowingNull(mediaTrack2.startTime, mediaTrack1.startTime);
// if (result == 0) {
// return mediaTrack1.dbId.compareTo(mediaTrack2.dbId);
// } else {
// return result;
// }
// }
//
// };
private final NamedReentrantReadWriteLock lock = new NamedReentrantReadWriteLock(MediaLibrary.class.getName(), /* fair */ false);
/**
* NOTE: The implementation of this lookup using simple linear search is a trade off between development effort and
@@ -74,7 +55,6 @@ class MediaLibrary {
*
*/
Collection<MediaTrack> findMediaTracksForRace(RegattaAndRaceIdentifier race) {
if (race != null) {
LockUtil.lockForRead(lock);
try {
@@ -87,7 +67,6 @@ class MediaLibrary {
} finally {
LockUtil.unlockAfterRead(lock);
}
}
// else
return Collections.emptySet();