diff --git a/vertx-core/src/main/java/io/vertx/core/Context.java b/vertx-core/src/main/java/io/vertx/core/Context.java index d906c07345d..3a507d749b1 100644 --- a/vertx-core/src/main/java/io/vertx/core/Context.java +++ b/vertx-core/src/main/java/io/vertx/core/Context.java @@ -217,33 +217,6 @@ default List processArgs() { */ boolean remove(Object key); - /** - * Get some local data from the context. - * - * @param key the key of the data - * @param the type of the data - * @return the data - */ - T getLocal(Object key); - - /** - * Put some local data in the context. - *

- * This can be used to share data between different handlers that share a context - * - * @param key the key of the data - * @param value the data - */ - void putLocal(Object key, Object value); - - /** - * Remove some local data from the context. - * - * @param key the key to remove - * @return true if removed successfully, false otherwise - */ - boolean removeLocal(Object key); - /** * @return The Vertx instance that created the context */ diff --git a/vertx-core/src/main/java/io/vertx/core/internal/ContextInternal.java b/vertx-core/src/main/java/io/vertx/core/internal/ContextInternal.java index 024ce31cf2f..7d85f97b88c 100644 --- a/vertx-core/src/main/java/io/vertx/core/internal/ContextInternal.java +++ b/vertx-core/src/main/java/io/vertx/core/internal/ContextInternal.java @@ -364,21 +364,27 @@ default void removeLocal(ContextLocal key, AccessMode accessMode) { putLocal(key, accessMode, null); } - @Deprecated + /** + * @deprecated instead use {@link #getLocal(ContextLocal, AccessMode)} + */ + @Deprecated(forRemoval = true) @SuppressWarnings("unchecked") - @Override default T getLocal(Object key) { return (T) localContextData().get(key); } - @Deprecated - @Override + /** + * @deprecated instead use {@link #putLocal(ContextLocal, AccessMode, Object)} + */ + @Deprecated(forRemoval = true) default void putLocal(Object key, Object value) { localContextData().put(key, value); } - @Deprecated - @Override + /** + * @deprecated instead use {@link #removeLocal(ContextLocal, AccessMode)} + */ + @Deprecated(forRemoval = true) default boolean removeLocal(Object key) { return localContextData().remove(key) != null; }