Make sure we mark the map as concurrent, as that is the implementation
we use and it seems we rely on it being concurrent.
JIRA: CONTROLLER-2071
Change-Id: I1deb9e42978fbc6373085e8280822f61541f1066
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
-import java.util.NavigableMap;
import java.util.SortedMap;
import java.util.TreeMap;
import java.util.SortedMap;
import java.util.TreeMap;
+import java.util.concurrent.ConcurrentNavigableMap;
import java.util.concurrent.ConcurrentSkipListMap;
import com.google.common.collect.Sets;
import java.util.concurrent.ConcurrentSkipListMap;
import com.google.common.collect.Sets;
private final SegmentedJournalWriter<E> writer;
private volatile long commitIndex;
private final SegmentedJournalWriter<E> writer;
private volatile long commitIndex;
- private final NavigableMap<Long, JournalSegment<E>> segments = new ConcurrentSkipListMap<>();
+ private final ConcurrentNavigableMap<Long, JournalSegment<E>> segments = new ConcurrentSkipListMap<>();
private final Collection<SegmentedJournalReader<E>> readers = Sets.newConcurrentHashSet();
private JournalSegment<E> currentSegment;
private final Collection<SegmentedJournalReader<E>> readers = Sets.newConcurrentHashSet();
private JournalSegment<E> currentSegment;