This is an automated email from the ASF dual-hosted git repository.
aaronai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-clients.git
The following commit(s) were added to refs/heads/master by this push:
new 9d0eb23 Add more comments (#110)
9d0eb23 is described below
commit 9d0eb23066ce35c6080855e26a32d49dd3282b88
Author: Aaron Ai <[email protected]>
AuthorDate: Sun Jul 31 17:10:52 2022 +0800
Add more comments (#110)
---
.../java/impl/producer/ClientSessionHandler.java | 44 ++++++++++++++++++++++
1 file changed, 44 insertions(+)
diff --git
a/java/client/src/main/java/org/apache/rocketmq/client/java/impl/producer/ClientSessionHandler.java
b/java/client/src/main/java/org/apache/rocketmq/client/java/impl/producer/ClientSessionHandler.java
index 817e24f..231de9c 100644
---
a/java/client/src/main/java/org/apache/rocketmq/client/java/impl/producer/ClientSessionHandler.java
+++
b/java/client/src/main/java/org/apache/rocketmq/client/java/impl/producer/ClientSessionHandler.java
@@ -29,27 +29,71 @@ import org.apache.rocketmq.client.apis.ClientException;
import org.apache.rocketmq.client.java.route.Endpoints;
public interface ClientSessionHandler {
+ /**
+ * Returns {@code true} if this handler is running.
+ */
@SuppressWarnings("BooleanMethodIsAlwaysInverted")
boolean isRunning();
+ /**
+ * Returns the shared scheduler.
+ *
+ * @return shared scheduler.
+ */
ScheduledExecutorService getScheduler();
+ /**
+ * Returns {@code true} if the endpoints is deprecated.
+ */
boolean isEndpointsDeprecated(Endpoints endpoints);
+ /**
+ * Await the settings to be synchronized with the server.
+ */
ListenableFuture<Void> awaitSettingSynchronized();
+ /**
+ * Indicates the client identifier.
+ *
+ * @return client identifier.
+ */
String clientId();
+ /**
+ * Get the settings of client.
+ *
+ * @return settings command.
+ */
TelemetryCommand settingsCommand();
+ /**
+ * Establish telemetry session stream to server.
+ *
+ * @param endpoints request endpoints.
+ * @param observer response observer.
+ * @return request observer.
+ * @throws ClientException if failed to establish telemetry session stream.
+ */
StreamObserver<TelemetryCommand> telemetry(Endpoints endpoints,
StreamObserver<TelemetryCommand> observer)
throws ClientException;
+ /**
+ * Event processor for {@link VerifyMessageCommand}.
+ */
void onSettingsCommand(Endpoints endpoints, Settings settings);
+ /**
+ * Event processor for {@link RecoverOrphanedTransactionCommand}.
+ */
void onRecoverOrphanedTransactionCommand(Endpoints endpoints,
RecoverOrphanedTransactionCommand command);
+ /**
+ * Event processor for {@link PrintThreadStackTraceCommand}.
+ */
void onVerifyMessageCommand(Endpoints endpoints, VerifyMessageCommand
command);
+ /**
+ * Event processor for {@link TelemetryCommand}.
+ */
void onPrintThreadStackTraceCommand(Endpoints endpoints,
PrintThreadStackTraceCommand command);
}