124 строки
8.6 KiB
YAML
124 строки
8.6 KiB
YAML
### YamlMime:JavaType
|
|
uid: "com.microsoft.azure.servicebus.TransactionContext"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext"
|
|
name: "TransactionContext"
|
|
nameWithType: "TransactionContext"
|
|
summary: "Represents an active servicebus transaction."
|
|
inheritances:
|
|
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
|
|
inheritedClassMethods:
|
|
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
|
|
methodsRef:
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
|
|
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
|
|
syntax: "public class **TransactionContext**"
|
|
constructors:
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.TransactionContext(java.nio.ByteBuffer,com.microsoft.azure.servicebus.primitives.MessagingFactory)"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.TransactionContext(ByteBuffer txnId, MessagingFactory messagingFactory)"
|
|
name: "TransactionContext(ByteBuffer txnId, MessagingFactory messagingFactory)"
|
|
nameWithType: "TransactionContext.TransactionContext(ByteBuffer txnId, MessagingFactory messagingFactory)"
|
|
parameters:
|
|
- name: "txnId"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html\">ByteBuffer</a>"
|
|
- name: "messagingFactory"
|
|
type: "<xref href=\"com.microsoft.azure.servicebus.primitives.MessagingFactory?alt=com.microsoft.azure.servicebus.primitives.MessagingFactory&text=MessagingFactory\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public TransactionContext(ByteBuffer txnId, MessagingFactory messagingFactory)"
|
|
fields:
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.NULL_TXN"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.NULL_TXN"
|
|
name: "NULL_TXN"
|
|
nameWithType: "TransactionContext.NULL_TXN"
|
|
modifiers:
|
|
- "static"
|
|
field:
|
|
type: "<xref href=\"com.microsoft.azure.servicebus.TransactionContext?alt=com.microsoft.azure.servicebus.TransactionContext&text=TransactionContext\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public static TransactionContext NULL_TXN"
|
|
methods:
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.commit()"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.commit()"
|
|
name: "commit()"
|
|
nameWithType: "TransactionContext.commit()"
|
|
summary: "Commits the transaction"
|
|
syntax: "public void commit()"
|
|
exceptions:
|
|
- description: "if Commit failed"
|
|
type: "<xref href=\"com.microsoft.azure.servicebus.primitives.ServiceBusException?alt=com.microsoft.azure.servicebus.primitives.ServiceBusException&text=ServiceBusException\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "if Commit failed"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
|
|
desc: "Commits the transaction"
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.commitAsync()"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.commitAsync()"
|
|
name: "commitAsync()"
|
|
nameWithType: "TransactionContext.commitAsync()"
|
|
summary: "Asynchronously commits the transaction"
|
|
syntax: "public CompletableFuture<Void> commitAsync()"
|
|
desc: "Asynchronously commits the transaction"
|
|
returns:
|
|
description: "a CompletableFuture for the commit operation"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.getTransactionId()"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.getTransactionId()"
|
|
name: "getTransactionId()"
|
|
nameWithType: "TransactionContext.getTransactionId()"
|
|
summary: "Represents the service-side transactionID"
|
|
syntax: "public ByteBuffer getTransactionId()"
|
|
desc: "Represents the service-side transactionID"
|
|
returns:
|
|
description: "transaction ID"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html\">ByteBuffer</a>"
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.notifyTransactionCompletion(boolean)"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.notifyTransactionCompletion(boolean commit)"
|
|
name: "notifyTransactionCompletion(boolean commit)"
|
|
nameWithType: "TransactionContext.notifyTransactionCompletion(boolean commit)"
|
|
summary: "This is not to be called by the user."
|
|
parameters:
|
|
- description: "true indicates success and false for rollback"
|
|
name: "commit"
|
|
type: "<xref href=\"boolean?alt=boolean&text=boolean\" data-throw-if-not-resolved=\"False\" />"
|
|
syntax: "public void notifyTransactionCompletion(boolean commit)"
|
|
desc: "This is not to be called by the user."
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.rollback()"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.rollback()"
|
|
name: "rollback()"
|
|
nameWithType: "TransactionContext.rollback()"
|
|
summary: "Rollback the transaction"
|
|
syntax: "public void rollback()"
|
|
exceptions:
|
|
- description: "if rollback failed"
|
|
type: "<xref href=\"com.microsoft.azure.servicebus.primitives.ServiceBusException?alt=com.microsoft.azure.servicebus.primitives.ServiceBusException&text=ServiceBusException\" data-throw-if-not-resolved=\"False\" />"
|
|
- description: "if rollback failed"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html\">InterruptedException</a>"
|
|
desc: "Rollback the transaction"
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.rollbackAsync()"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.rollbackAsync()"
|
|
name: "rollbackAsync()"
|
|
nameWithType: "TransactionContext.rollbackAsync()"
|
|
summary: "Asynchronously rollback the transaction."
|
|
syntax: "public CompletableFuture<Void> rollbackAsync()"
|
|
desc: "Asynchronously rollback the transaction."
|
|
returns:
|
|
description: "a CompletableFuture for the rollback operation"
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html\">CompletableFuture</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Void.html\">Void</a>>"
|
|
- uid: "com.microsoft.azure.servicebus.TransactionContext.toString()"
|
|
fullName: "com.microsoft.azure.servicebus.TransactionContext.toString()"
|
|
name: "toString()"
|
|
nameWithType: "TransactionContext.toString()"
|
|
overridden: "java.lang.Object.toString()"
|
|
syntax: "public String toString()"
|
|
returns:
|
|
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
|
|
type: "class"
|
|
desc: "Represents an active servicebus transaction. A transaction is initiated by calling <xref uid=\"com.microsoft.azure.servicebus.primitives.MessagingFactory.startTransactionAsync()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MessagingFactory#startTransactionAsync()\"></xref>. A transaction can result in commit or rollback. To commit, call <xref uid=\"com.microsoft.azure.servicebus.primitives.MessagingFactory.endTransactionAsync(com.microsoft.azure.servicebus.TransactionContext,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MessagingFactory#endTransactionAsync(TransactionContext, boolean)\"></xref> with `commit = true` To rollback, call <xref uid=\"com.microsoft.azure.servicebus.primitives.MessagingFactory.endTransactionAsync(com.microsoft.azure.servicebus.TransactionContext,boolean)\" data-throw-if-not-resolved=\"false\" data-raw-source=\"MessagingFactory#endTransactionAsync(TransactionContext, boolean)\"></xref> with `commit = false`"
|
|
metadata: {}
|
|
package: "com.microsoft.azure.servicebus"
|
|
artifact: com.microsoft.azure:azure-servicebus:3.6.7
|