public class SimpleTransaction extends java.lang.Object implements MessageTransaction
| Constructor and Description |
|---|
SimpleTransaction(java.lang.String transactionId) |
| Modifier and Type | Method and Description |
|---|---|
void |
addClosable(java.lang.AutoCloseable closeable) |
TransactedExchange |
addExchange(java.lang.String exchangeId)
Adds an exchange to the transaction.
|
void |
close() |
TransactedExchange |
getExchange(java.lang.String exchangeId)
Returns the exchange in the transaction with the given ID (if present).
|
java.util.List<TransactedExchange> |
getExchanges()
Returns an ordered list of exchange ID's that have been executed within
the context of the transaction.
|
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Provides direct access to the Map of properties for the transaction.
|
java.lang.Object |
getProperty(java.lang.String name)
Returns the property with the given name.
|
java.util.Set<java.lang.String> |
getPropertyNames()
Returns the names of the properties associated with the context.
|
java.lang.String |
getTransactionID()
Returns a unique identifier for a transaction.
|
void |
setProperty(java.lang.String name,
java.lang.Object property)
Adds or replaces a property.
|
public java.lang.Object getProperty(java.lang.String name)
MessageTransactiongetProperty in interface MessageTransactionname - Name of the property.public void setProperty(java.lang.String name,
java.lang.Object property)
MessageTransactionsetProperty in interface MessageTransactionname - Name of the property.property - Value of the property.public java.util.Set<java.lang.String> getPropertyNames()
MessageTransactiongetPropertyNames in interface MessageTransactionpublic java.util.Map<java.lang.String,java.lang.Object> getProperties()
MessageTransactiongetProperties in interface MessageTransactionpublic java.lang.String getTransactionID()
MessageTransactiongetTransactionID in interface MessageTransactionpublic java.util.List<TransactedExchange> getExchanges()
MessageTransactiongetExchanges in interface MessageTransactionpublic TransactedExchange addExchange(java.lang.String exchangeId)
MessageTransactionaddExchange in interface MessageTransactionexchangeId - ID of the exchange.public TransactedExchange getExchange(java.lang.String exchangeId)
MessageTransactiongetExchange in interface MessageTransactionexchangeId - ID of the exchange.public void addClosable(java.lang.AutoCloseable closeable)
addClosable in interface MessageTransactionpublic void close()
close in interface java.lang.AutoCloseable?? 2022 Perforce Software, All rights reserved
This software is the confidential and proprietary information of Perforce, Inc. and is subject to copyright protection under laws of the United States of America and other countries. The use of this software should be in accordance with the license agreement terms you entered into with Perforce, Inc.