Skip to content

Commit bd192d5

Browse files
committed
updating java docs
1 parent 433845b commit bd192d5

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

azure-servicebus/src/main/java/com/microsoft/azure/servicebus/ClientFactory.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -685,8 +685,6 @@ public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsyn
685685
* @param entityPath path of entity
686686
* @param sessionId session id, if null, service will return the first available session, otherwise, service will return specified session
687687
* @return a CompletableFuture representing the pending session accepting
688-
* @throws InterruptedException if the current thread was interrupted while waiting
689-
* @throws ServiceBusException if the session cannot be accepted
690688
*/
691689
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String sessionId) {
692690
return acceptSessionFromEntityPathAsync(messagingFactory, entityPath, sessionId, DEFAULTRECEIVEMODE);
@@ -699,8 +697,6 @@ public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsyn
699697
* @param sessionId session id, if null, service will return the first available session, otherwise, service will return specified session
700698
* @param receiveMode PeekLock or ReceiveAndDelete
701699
* @return a CompletableFuture representing the pending session accepting
702-
* @throws InterruptedException if the current thread was interrupted while waiting
703-
* @throws ServiceBusException if the session cannot be accepted
704700
*/
705701
public static CompletableFuture<IMessageSession> acceptSessionFromEntityPathAsync(MessagingFactory messagingFactory, String entityPath, String sessionId, ReceiveMode receiveMode) {
706702
Utils.assertNonNull("messagingFactory", messagingFactory);

azure-servicebus/src/main/java/com/microsoft/azure/servicebus/TransactionContext.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public String toString() {
3939

4040
/**
4141
* Commits the transaction
42-
* @throws ServiceBusException
43-
* @throws InterruptedException
42+
* @throws ServiceBusException if Commit failed
43+
* @throws InterruptedException if the current thread was interrupted while waiting
4444
*/
4545
public void commit() throws ServiceBusException, InterruptedException {
4646
if (this.messagingFactory == null) {
@@ -52,6 +52,7 @@ public void commit() throws ServiceBusException, InterruptedException {
5252

5353
/**
5454
* Asynchronously commits the transaction
55+
* @return a CompletableFuture for the commit operation
5556
*/
5657
public CompletableFuture<Void> commitAsync() {
5758
if (this.messagingFactory == null) {
@@ -65,8 +66,8 @@ public CompletableFuture<Void> commitAsync() {
6566

6667
/**
6768
* Rollback the transaction
68-
* @throws ServiceBusException
69-
* @throws InterruptedException
69+
* @throws ServiceBusException if rollback failed
70+
* @throws InterruptedException if the current thread was interrupted while waiting
7071
*/
7172
public void rollback() throws ServiceBusException, InterruptedException {
7273
if (this.messagingFactory == null) {
@@ -78,6 +79,7 @@ public void rollback() throws ServiceBusException, InterruptedException {
7879

7980
/**
8081
* Asynchronously rollback the transaction.
82+
* @return a CompletableFuture for the rollback operation
8183
*/
8284
public CompletableFuture<Void> rollbackAsync() {
8385
if (this.messagingFactory == null) {
@@ -91,6 +93,7 @@ public CompletableFuture<Void> rollbackAsync() {
9193

9294
/**
9395
* This is not to be called by the user.
96+
* @param commit true indicates success and false for rollback
9497
*/
9598
public void notifyTransactionCompletion(boolean commit) {
9699
if (txnHandler != null) {

azure-servicebus/src/main/java/com/microsoft/azure/servicebus/primitives/MessagingFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ public void onReactorInit(Event e)
110110
* Starts a new service side transaction. The {@link TransactionContext} should be passed to all operations that
111111
* needs to be in this transaction.
112112
* @return a new transaction
113-
* @throws ServiceBusException
114-
* @throws InterruptedException
113+
* @throws ServiceBusException if transaction fails to start
114+
* @throws InterruptedException if the current thread was interrupted while waiting
115115
*/
116116
public TransactionContext startTransaction() throws ServiceBusException, InterruptedException {
117117
return Utils.completeFuture(this.startTransactionAsync());
@@ -133,8 +133,8 @@ public CompletableFuture<TransactionContext> startTransactionAsync() {
133133
* @param transaction The transaction object.
134134
* @param commit A boolean value of <code>true</code> indicates transaction to be committed. A value of
135135
* <code>false</code> indicates a transaction rollback.
136-
* @throws ServiceBusException
137-
* @throws InterruptedException
136+
* @throws ServiceBusException if transaction fails to end
137+
* @throws InterruptedException if the current thread was interrupted while waiting
138138
*/
139139
public void endTransaction(TransactionContext transaction, boolean commit) throws ServiceBusException, InterruptedException {
140140
Utils.completeFuture(this.endTransactionAsync(transaction, commit));

0 commit comments

Comments
 (0)