From 0ecce0d5daa67fc1abf81dc827c2a3dc3e85fcfb Mon Sep 17 00:00:00 2001 From: "Matthias J. Sax" Date: Fri, 24 Jul 2020 16:22:10 -0700 Subject: [PATCH] MINOR: removed incorrect deprecation annotations (#9061) Reviewers: Jorge Esteban Quilcate Otoya , John Roesler --- .../state/internals/InMemorySessionStore.java | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/streams/src/main/java/org/apache/kafka/streams/state/internals/InMemorySessionStore.java b/streams/src/main/java/org/apache/kafka/streams/state/internals/InMemorySessionStore.java index 35797f875c1..b10f4c4b524 100644 --- a/streams/src/main/java/org/apache/kafka/streams/state/internals/InMemorySessionStore.java +++ b/streams/src/main/java/org/apache/kafka/streams/state/internals/InMemorySessionStore.java @@ -16,15 +16,6 @@ */ package org.apache.kafka.streams.state.internals; -import java.util.Iterator; -import java.util.Map; -import java.util.Map.Entry; -import java.util.NoSuchElementException; -import java.util.Objects; -import java.util.Set; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ConcurrentNavigableMap; -import java.util.concurrent.ConcurrentSkipListMap; import org.apache.kafka.clients.consumer.ConsumerRecord; import org.apache.kafka.common.metrics.Sensor; import org.apache.kafka.common.utils.Bytes; @@ -41,6 +32,16 @@ import org.apache.kafka.streams.state.SessionStore; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentNavigableMap; +import java.util.concurrent.ConcurrentSkipListMap; + public class InMemorySessionStore implements SessionStore { private static final Logger LOG = LoggerFactory.getLogger(InMemorySessionStore.class); @@ -155,7 +156,6 @@ public class InMemorySessionStore implements SessionStore { return null; } - @Deprecated @Override public KeyValueIterator, byte[]> findSessions(final Bytes key, final long earliestSessionEndTime, @@ -170,7 +170,6 @@ public class InMemorySessionStore implements SessionStore { endTimeMap.tailMap(earliestSessionEndTime, true).entrySet().iterator()); } - @Deprecated @Override public KeyValueIterator, byte[]> findSessions(final Bytes keyFrom, final Bytes keyTo, @@ -259,7 +258,7 @@ public class InMemorySessionStore implements SessionStore { final Bytes keyTo, final long latestSessionStartTime, final Iterator>>> endTimeIterator) { - final InMemorySessionStoreIterator iterator = new InMemorySessionStoreIterator(keyFrom, keyTo, latestSessionStartTime, endTimeIterator, it -> openIterators.remove(it)); + final InMemorySessionStoreIterator iterator = new InMemorySessionStoreIterator(keyFrom, keyTo, latestSessionStartTime, endTimeIterator, openIterators::remove); openIterators.add(iterator); return iterator; }