codelipenghui commented on a change in pull request #5570: Transaction log
implemention
URL: https://github.com/apache/pulsar/pull/5570#discussion_r346158483
##########
File path:
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/TransactionMetadataStore.java
##########
@@ -32,24 +33,34 @@
public interface TransactionMetadataStore {
/**
- * Query the {@link TxnStatus} of a given transaction <tt>txnid</tt>.
+ * The state of the transactionMetadataStore {@link
TransactionMetadataStore}.
+ */
+ enum State {
+ NONE,
+ INITIALIZING,
+ READY,
+ CLOSE
+ }
+
+ /**
+ * Query the {@link TxnStatus} of a given transaction <tt>txnId</tt>.
*
- * @param txnid transaction id
+ * @param txnID {@link TxnID} for get transaction status
* @return a future represents the result of this operation.
* it returns {@link TxnStatus} of the given transaction.
*/
- default CompletableFuture<TxnStatus> getTxnStatus(TxnID txnid) {
- return getTxnMeta(txnid).thenApply(txnMeta -> txnMeta.status());
+ default CompletableFuture<TxnStatus> getTxnStatus(TxnID txnID) {
+ return getTxnMeta(txnID).thenApply(txnMeta -> txnMeta.status());
}
/**
* Query the {@link TxnMeta} of a given transaction <tt>txnid</tt>.
*
- * @param txnid transaction id
+ * @param txnID {@link TxnID} for get transaction metadata
* @return a future represents the result of this operation.
* it returns {@link TxnMeta} of the given transaction.
*/
- CompletableFuture<TxnMeta> getTxnMeta(TxnID txnid);
+ CompletableFuture<TxnMeta> getTxnMeta(TxnID txnID);
Review comment:
We'd better use `getTxnMetaAsync` here, since this is an asynchronous
method, and the java doc also need to describe this is a asynchronous method.
please check others.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services