Class NoTransaction

java.lang.Object
org.iplass.mtp.transaction.NoTransaction
All Implemented Interfaces:
Transaction

final class NoTransaction
extends java.lang.Object
implements Transaction
トランザクションがない状態を表すTransactionです。
  • Field Summary

    Fields inherited from interface org.iplass.mtp.transaction.Transaction

    NO_TRANSACTION
  • Constructor Summary

    Constructors 
    Constructor Description
    NoTransaction()  
  • Method Summary

    Modifier and Type Method Description
    void addTransactionListener​(TransactionListener listener)
    このトランザクションのcommit、rollbackを監視するリスナーを登録します。
    void commit()
    トランザクションをコミットします。
    boolean equals​(java.lang.Object obj)  
    java.lang.Object getAttribute​(java.lang.Object key)
    このトランザクションコンテキストに紐づけられている特定の属性を取得します。 同一トランザクション内でsetAttribute()したものがあれば、その値が取得できます。
    TransactionStatus getStatus()
    トランザクションの状態を取得します。
    int hashCode()  
    boolean isReadOnly()
    このトランザクションがReadOnlyとしてマークされているかどうかを取得します。
    boolean isRollbackOnly()
    このトランザクションがsetRollbackOnlyされているかどうかを取得します。
    java.lang.Object removeAttribute​(java.lang.Object key)
    このトランザクションコンテキストに紐づけられている特定の属性を削除します。
    void rollback()
    トランザクションをロールバックします。
    void setAttribute​(java.lang.Object key, java.lang.Object value)
    このトランザクションのコンテキストに特定の属性を紐づけます。
    void setRollbackOnly()
    このトランザクションをロールバックするものとしてマークします。 setRollbackOnlyされたトランザクションは最終的にはロールバックされます。

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.iplass.mtp.transaction.Transaction

    afterCommit, afterRollback
  • Constructor Details

  • Method Details

    • commit

      public void commit()
      Description copied from interface: Transaction
      トランザクションをコミットします。
      Specified by:
      commit in interface Transaction
    • rollback

      public void rollback()
      Description copied from interface: Transaction
      トランザクションをロールバックします。
      Specified by:
      rollback in interface Transaction
    • setRollbackOnly

      public void setRollbackOnly()
      Description copied from interface: Transaction
      このトランザクションをロールバックするものとしてマークします。 setRollbackOnlyされたトランザクションは最終的にはロールバックされます。
      Specified by:
      setRollbackOnly in interface Transaction
    • isRollbackOnly

      public boolean isRollbackOnly()
      Description copied from interface: Transaction
      このトランザクションがsetRollbackOnlyされているかどうかを取得します。
      Specified by:
      isRollbackOnly in interface Transaction
      Returns:
      setRollbackOnlyの場合true
    • isReadOnly

      public boolean isReadOnly()
      Description copied from interface: Transaction
      このトランザクションがReadOnlyとしてマークされているかどうかを取得します。
      Specified by:
      isReadOnly in interface Transaction
      Returns:
    • getStatus

      public TransactionStatus getStatus()
      Description copied from interface: Transaction
      トランザクションの状態を取得します。
      Specified by:
      getStatus in interface Transaction
      Returns:
    • setAttribute

      public void setAttribute​(java.lang.Object key, java.lang.Object value)
      Description copied from interface: Transaction
      このトランザクションのコンテキストに特定の属性を紐づけます。
      Specified by:
      setAttribute in interface Transaction
      Parameters:
      key - 属性のキー
      value - 属性の値
    • getAttribute

      public java.lang.Object getAttribute​(java.lang.Object key)
      Description copied from interface: Transaction
      このトランザクションコンテキストに紐づけられている特定の属性を取得します。 同一トランザクション内でsetAttribute()したものがあれば、その値が取得できます。
      Specified by:
      getAttribute in interface Transaction
      Parameters:
      key - 属性のキー
      Returns:
      属性の値
    • removeAttribute

      public java.lang.Object removeAttribute​(java.lang.Object key)
      Description copied from interface: Transaction
      このトランザクションコンテキストに紐づけられている特定の属性を削除します。
      Specified by:
      removeAttribute in interface Transaction
      Parameters:
      key - 属性のキー
      Returns:
      削除された値
    • addTransactionListener

      public void addTransactionListener​(TransactionListener listener)
      Description copied from interface: Transaction
      このトランザクションのcommit、rollbackを監視するリスナーを登録します。
      Specified by:
      addTransactionListener in interface Transaction
    • equals

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object