This is an interface object associated with an explicit transaction. This class cannot be inherited.
Namespace: NetricsServerInterface
Assembly: NetricsServerInterface (in NetricsServerInterface.dll)
Syntax
Visual Basic (Declaration) |
---|
Public NotInheritable Class NetricsTransaction Inherits NetricsServerInterface |
C# |
---|
public sealed class NetricsTransaction : NetricsServerInterface |
C++ |
---|
ref class NetricsTransaction sealed : NetricsServerInterface |
J# |
---|
public final class NetricsTransaction extends NetricsServerInterface |
JScript |
---|
public final class NetricsTransaction extends NetricsServerInterface |
Remarks
NetricsTransaction is an extension of the NetricsServerInterface class. It provides all of the functionality of the NetricsServerInterface class, the difference being a NetricsTransaction object is coupled to a particular explicit transaction on the ibi™ Patterns - Search Server. NetricsTransaction is the only means provided in the .NET API for creating explicit transactions and associating operations with an explicit transaction.
For an explanation of transactions in ibi™ Patterns - Search please read the "ibi™ Patterns - Search Concepts Guide". This explains the difference between explicit and implicit transactions along with other items that should be understood before using transactions.
When a NetricsTransaction object is created a new explicit transaction is created on the ibi™ Patterns - Search Server. All operations performed through the NetricsTransaction object are associated with this explicit transaction. Once all work to be associated with the transaction is complete the NetricsTransaction object provides methods for terminating the transaction by either committing it, or aborting it, which rolls back all changes made under the transaction. Once a transaction has been closed through one of these calls all attempts to perform further update operations through the NetricsTransaction object will throw an exception.
Operations that do not update data on the ibi™ Patterns - Search Server, such as queries, status reports and fetching of records, are not associated with transactions. Such operations can be performed using a NetricsTransaction object, but if no updates are to be performed a NetricsServerInterface object should be used, not a NetricsTransaction object.
Transactions should never be left open. Once a NetricsTransaction object is created it MUST be closed by calling one of commitWork, forceCommitWork or abortWork, even if no operations were performed. The ibi™ Patterns - Search Server can be configured to automatically close transactions that are left open and idle longer than a designated period of time. Applications that open transactions by creating a NetricsTransaction object, and then let that object sit idle for long periods of time, may find that operations fail when the NetricsTransaction object is finally used because the transaction was automatically closed. Read only operations are not associated with a transaction, so even if such operations are performed through a NetricsTransaction object, the associated transaction is still left idle and may get automatically closed.
Objects of this class are NOT thread safe and should never be shared across threads.
Objects of this class are created using a NetricsConMgr object. There are no public constructors for this class.
For an example of how to use this class see the Namespace documentation.
Inheritance Hierarchy
NetricsServerInterface.NetricsServerInterface
NetricsServerInterface.NetricsTransaction