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)
MessageTransaction
getProperty
in interface MessageTransaction
name
- Name of the property.public void setProperty(java.lang.String name, java.lang.Object property)
MessageTransaction
setProperty
in interface MessageTransaction
name
- Name of the property.property
- Value of the property.public java.util.Set<java.lang.String> getPropertyNames()
MessageTransaction
getPropertyNames
in interface MessageTransaction
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
MessageTransaction
getProperties
in interface MessageTransaction
public java.lang.String getTransactionID()
MessageTransaction
getTransactionID
in interface MessageTransaction
public java.util.List<TransactedExchange> getExchanges()
MessageTransaction
getExchanges
in interface MessageTransaction
public TransactedExchange addExchange(java.lang.String exchangeId)
MessageTransaction
addExchange
in interface MessageTransaction
exchangeId
- ID of the exchange.public TransactedExchange getExchange(java.lang.String exchangeId)
MessageTransaction
getExchange
in interface MessageTransaction
exchangeId
- ID of the exchange.public void addClosable(java.lang.AutoCloseable closeable)
addClosable
in interface MessageTransaction
public 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.