org.apache.flume.channel

## Class PseudoTxnMemoryChannel.NoOpTransaction

- java.lang.Object
- - org.apache.flume.channel.PseudoTxnMemoryChannel.NoOpTransaction

- All Implemented Interfaces:
    Transaction
  Enclosing class:
    PseudoTxnMemoryChannel

      public static class PseudoTxnMemoryChannel.NoOpTransaction
      extends Object
      implements Transaction

  A no-op transaction implementation that does nothing at all.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.flume.Transaction

      `Transaction.TransactionState`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PseudoTxnMemoryChannel.NoOpTransaction()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `begin()` Starts a transaction boundary for the current channel operation.
    `void` | `close()` Ends a transaction boundary for the current channel operation.
    `void` | `commit()` Indicates that the transaction can be successfully committed.
    `void` | `rollback()` Indicates that the transaction can must be aborted.
    `static Transaction` | `sharedInstance()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PseudoTxnMemoryChannel.NoOpTransaction

          public PseudoTxnMemoryChannel.NoOpTransaction()

  - ### Method Detail

    - #### sharedInstance

          public static Transaction sharedInstance()

    - #### begin

          public void begin()

      Description copied from interface: `Transaction`

      Starts a transaction boundary for the current channel operation. If a transaction is already in progress, this method will join that transaction using reference counting.

      Note: For every invocation of this method there must be a corresponding invocation of Transaction.close() method. Failure to ensure this can lead to dangling transactions and unpredictable results.

      Specified by:
        `begin` in interface `Transaction`

    - #### commit

          public void commit()

      Description copied from interface: `Transaction`
      Indicates that the transaction can be successfully committed. It is required that a transaction be in progress when this method is invoked.
      Specified by:
        `commit` in interface `Transaction`

    - #### rollback

          public void rollback()

      Description copied from interface: `Transaction`
      Indicates that the transaction can must be aborted. It is required that a transaction be in progress when this method is invoked.
      Specified by:
        `rollback` in interface `Transaction`

    - #### close

          public void close()

      Description copied from interface: `Transaction`

      Ends a transaction boundary for the current channel operation. If a transaction is already in progress, this method will join that transaction using reference counting. The transaction is completed only if there are no more references left for this transaction.

      Note: For every invocation of this method there must be a corresponding invocation of Transaction.begin() method. Failure to ensure this can lead to dangling transactions and unpredictable results.

      Specified by:
        `close` in interface `Transaction`

Copyright © 2009-2016 Apache Software Foundation. All Rights Reserved.