diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-04-01 15:59:10 +0200 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-04-01 15:59:10 +0200 |
commit | df755138e47d1ded561800978875e59094c4b1b4 (patch) | |
tree | b6f6f7bc0259a15b5f11902e2d58c8c994e5a17e /documentapi/src/main/java/com/yahoo/documentapi/SyncSession.java | |
parent | 14bb8f3c745f9b153e289ff62b38c911966ea32b (diff) |
Deprecate DocumentAPI methods using explicit operation priority
This is functionality that made more sense when we had spinning drives
and no async write scheduling in the backend. Going away on Vespa 8.
Diffstat (limited to 'documentapi/src/main/java/com/yahoo/documentapi/SyncSession.java')
-rwxr-xr-x | documentapi/src/main/java/com/yahoo/documentapi/SyncSession.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/documentapi/src/main/java/com/yahoo/documentapi/SyncSession.java b/documentapi/src/main/java/com/yahoo/documentapi/SyncSession.java index 36568a69ea2..02a1634f8ec 100755 --- a/documentapi/src/main/java/com/yahoo/documentapi/SyncSession.java +++ b/documentapi/src/main/java/com/yahoo/documentapi/SyncSession.java @@ -35,7 +35,10 @@ public interface SyncSession extends Session { * * @param documentPut the DocumentPut operation * @param priority the priority with which to perform this operation + * @deprecated specifying explicit operation priority is deprecated */ + @Deprecated(forRemoval = true) // TODO: Remove on Vespa 8 + @SuppressWarnings("removal") // TODO: Remove on Vespa 8 default void put(DocumentPut documentPut, DocumentProtocol.Priority priority) { put(documentPut, parameters().withPriority(priority)); } @@ -67,7 +70,10 @@ public interface SyncSession extends Session { * @param priority the priority with which to perform this operation * @return the document with this id, or null if there is none * @throws UnsupportedOperationException thrown if this does not support retrieving + * @deprecated specifying explicit operation priority is deprecated. Set fieldSet via + * {@link #get(DocumentId, DocumentOperationParameters, Duration)} instead. */ + @Deprecated(forRemoval = true) // TODO: Remove on Vespa 8 default Document get(DocumentId id, String fieldSet, DocumentProtocol.Priority priority) { return get(id, fieldSet, priority, null); } @@ -93,7 +99,9 @@ public interface SyncSession extends Session { * @return the known document having this id, or null if there is no document having this id * @throws UnsupportedOperationException thrown if this access does not support retrieving * @throws DocumentAccessException on any messagebus error, including timeout ({@link com.yahoo.messagebus.ErrorCode#TIMEOUT}) + * @deprecated specifying explicit operation priority is deprecated */ + @Deprecated(forRemoval = true) // TODO: Remove on Vespa 8 Document get(DocumentId id, String fieldSet, DocumentProtocol.Priority priority, Duration timeout); /** @@ -106,7 +114,7 @@ public interface SyncSession extends Session { * @throws UnsupportedOperationException thrown if this access does not support retrieving * @throws DocumentAccessException on any messagebus error, including timeout ({@link com.yahoo.messagebus.ErrorCode#TIMEOUT}) */ - default Document get(DocumentId id, DocumentOperationParameters parameters, Duration timeout) { + default Document get(DocumentId id, DocumentOperationParameters parameters, Duration timeout) { return get(id, timeout); } @@ -125,7 +133,9 @@ public interface SyncSession extends Session { * @param priority the priority with which to perform this operation * @return true if the document with this id was removed, false otherwise. * @throws UnsupportedOperationException thrown if this access does not support removal + * @deprecated specifying explicit operation priority is deprecated */ + @Deprecated(forRemoval = true) // TODO: Remove on Vespa 8 boolean remove(DocumentRemove documentRemove, DocumentProtocol.Priority priority); /** @@ -162,7 +172,9 @@ public interface SyncSession extends Session { * @throws DocumentAccessException on update error, including but not limited to: 1. timeouts, * 2. the document exists but the {@link DocumentUpdate#setCondition(TestAndSetCondition) condition} * is not met. + * @deprecated specifying explicit operation priority is deprecated */ + @Deprecated(forRemoval = true) // TODO: Remove on Vespa 8 boolean update(DocumentUpdate update, DocumentProtocol.Priority priority); /** |