Skip to content

Commit 45df7f2

Browse files
committed
chore(javadoc): do not use @APinote in JDK 17
1 parent 9c91703 commit 45df7f2

3 files changed

Lines changed: 13 additions & 29 deletions

File tree

src/main/java/io/weaviate/client6/v1/api/collections/batch/BatchContext.java

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -152,24 +152,6 @@ public final class BatchContext<PropertiesT> implements Closeable {
152152
/** Lightway check to ensure users cannot send on a closed context. */
153153
private volatile boolean closed;
154154

155-
// /** Closing state. */
156-
// private volatile Closing closing;
157-
158-
// /**
159-
// * setClosing trasitions BatchContext to {@link Closing} state exactly once.
160-
// * Once this method returns, the caller can call {@code closing.await()}.
161-
// */
162-
// void setClosing(Exception ex) {
163-
// if (closing == null) {
164-
// synchronized (Closing.class) {
165-
// if (closing == null) {
166-
// closing = new Closing(ex);
167-
// setState(closing);
168-
// }
169-
// }
170-
// }
171-
// }
172-
173155
BatchContext(
174156
StreamFactory<Message, Event> streamFactory,
175157
int maxSizeBytes,
@@ -207,6 +189,7 @@ void start(State nextState) {
207189
workers = new CountDownLatch(2);
208190

209191
messages = streamFactory.createStream(new Recv());
192+
System.out.println("create stream");
210193

211194
// Start the stream and await Started message.
212195
messages.onNext(Message.start(collectionHandleDefaults.consistencyLevel()));
@@ -654,9 +637,6 @@ private final void onResults(Event.Results results) {
654637
}
655638

656639
private final void onBackoff(Event.Backoff backoff) {
657-
System.out.print("========== BACKOFF ==============");
658-
System.out.print(backoff.maxSize());
659-
System.out.print("=================================");
660640
batch.setMaxSize(backoff.maxSize());
661641
}
662642

@@ -840,11 +820,13 @@ private void reconnectNow() {
840820
/**
841821
* Schedule a task to {@link #reconnect} after a delay.
842822
*
843-
* @param delaySeconds Delay in seconds.
823+
* <h3>API Note</h3>
824+
* The task is scheduled on {@link #scheduledExec} even if
825+
* {@code delaySeconds == 0} to avoid blocking gRPC worker
826+
* thread,
827+
* where the {@link BatchContext#onEvent} callback runs.
844828
*
845-
* @apiNote The task is scheduled on {@link #scheduledExec} even if
846-
* {@code delaySeconds == 0} to avoid blocking gRPC worker thread,
847-
* where the {@link BatchContext#onEvent} callback runs.
829+
* @param delaySeconds Delay in seconds.
848830
*/
849831
private void reconnectAfter(long delaySeconds) {
850832
retries++;

src/main/java/io/weaviate/client6/v1/api/collections/batch/MessageSizeUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ final class MessageSizeUtil {
1313
* Safety margin of 1KB to allow for the overhead of surrounding Data field tags
1414
* and the encoded length of the final payload.
1515
*
16-
* @apiNote Package-private for testing.
16+
* <p>
17+
* Package-private for testing.
1718
*/
1819
static final int SAFETY_MARGIN = 1024;
1920

src/main/java/io/weaviate/client6/v1/internal/grpc/GrpcTransport.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ <RequestT, RequestM, ReplyM, ResponseT> CompletableFuture<ResponseT> performRequ
1616
/**
1717
* Create stream for batch insertion.
1818
*
19-
* @apiNote Batch insertion is presently the only operation performed over a
20-
* StreamStream connection, which is why we do not parametrize this
21-
* method.
19+
* <h3>API Note</h3>
20+
* Batch insertion is presently the only operation performed over a
21+
* StreamStream connection, which is why we do not parametrize this
22+
* method.
2223
*/
2324
StreamObserver<WeaviateProtoBatch.BatchStreamRequest> createStream(
2425
StreamObserver<WeaviateProtoBatch.BatchStreamReply> recv);

0 commit comments

Comments
 (0)