removed obsolete comment

This commit is contained in:
Axel Uhl committed 2014-05-08 13:11:03 +02:00
1 parent 6bda5a92e5
commit 4d38870c9e
1 file changed
+5 -1
@@ -310,13 +310,17 @@ public class TrackBasedEstimationWindTrackImpl extends VirtualWindTrackImpl impl
return cache;
}
/**
* The caller must <em>not</em> hold the read lock of {@link #cacheLock} when calling this method (unless the caller
* also holds the corresponding write lock) because this method will acquire the corresponding write lock, and
* upgrading from a read lock to a write lock is not possible.
*/
protected void cache(TimePoint timePoint, WindWithConfidence<TimePoint> fix) {
// can't use lockForWrite() here because caching can happen while holding the read lock, and the lock can't be
// upgraded. But lockForRead() and synchronization will do the job because all invalidations lock the write lock,
// and all contains() checks and get() calls use synchronization too.
LockUtil.lockForWrite(cacheLock);
try {
// synchronization necessary to protect writeObject from ConcurrentModificationException
if (fix == null) {
timePointsWithCachedNullResult.add(timePoint);
timePointsWithCachedNullResultFastContains.add(timePoint);