クラス org.objectweb.cjdbc.controller.virtualdatabase.protocol.Rollback

org.objectweb.cjdbc.controller.virtualdatabase.protocol.Rollbackに対する継承グラフ

Inheritance graph
[凡例]
org.objectweb.cjdbc.controller.virtualdatabase.protocol.Rollbackのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

説明

Execute a distributed rollback.

作者:
Emmanuel Cecchet
バージョン:
1.0

Rollback.java42 行で定義されています。

Public メソッド

 Rollback (long transactionId)
Object rollback (DistributedRequestManager drm) throws SQLException

Static Public メソッド

Message getMessage (Object msg)

Private 変数

long transactionId


コンストラクタとデストラクタ

org.objectweb.cjdbc.controller.virtualdatabase.protocol.Rollback.Rollback long  transactionId  ) 
 

Creates a new Rollback message.

引数:
transactionId id of the transaction to rollback

Rollback.java52 行で定義されています。

00053   {
00054     this.transactionId = transactionId;
00055   }


メソッド

Message org.objectweb.cjdbc.controller.virtualdatabase.protocol.CJDBCGroupMessage.getMessage Object  msg  )  [static, inherited]
 

Builds a JGroups message from the given object.

Src and dest are filled with null.

引数:
msg a Serializable object
戻り値:
a JGroup message containing the object

CJDBCGroupMessage.java47 行で定義されています。

00048   {
00049     return new Message(null, null, (Serializable) msg);
00050   }

Object org.objectweb.cjdbc.controller.virtualdatabase.protocol.Rollback.rollback DistributedRequestManager  drm  )  throws SQLException
 

参照:
org.objectweb.cjdbc.controller.virtualdatabase.protocol.DistributedRequest.executeRequest(org.objectweb.cjdbc.controller.requestmanager.distributed.DistributedRequestManager)

Rollback.java60 行で定義されています。

参照先 org.objectweb.cjdbc.controller.requestmanager.TransactionMarkerMetaData.getTransactionId(), と org.objectweb.cjdbc.common.sql.AbstractRequest.setTransactionId().

00061   {
00062     try
00063     {
00064       Long tid = new Long(transactionId);
00065       TransactionMarkerMetaData tm = drm.getTransactionMarker(tid);
00066 
00067       // Wait for the scheduler to give us the authorization to execute
00068       drm.getScheduler().rollback(tm);
00069 
00070       if (drm.getLogger().isDebugEnabled())
00071         drm.getLogger().debug(Translate.get("transaction.rollback", "" + tid));
00072 
00073       try
00074       {
00075         // Send to load balancer
00076         drm.getLoadBalancer().rollback(tm);
00077 
00078         // Notify the cache
00079         if (drm.getResultCache() != null)
00080           drm.getResultCache().rollback(tm.getTransactionId());
00081 
00082         // Notify the recovery log manager
00083         if (drm.getRecoveryLog() != null)
00084           drm.getRecoveryLog().rollback(tm);
00085       }
00086       catch (SQLException e)
00087       {
00088         return e;
00089       }
00090       catch (AllBackendsFailedException e)
00091       {
00092         AbstractRequest request = new UnknownRequest("rollback", false, 0);
00093         request.setTransactionId(transactionId);
00094         drm.addFailedOnAllBackends(request);
00095         if (drm.getLogger().isDebugEnabled())
00096           drm.getLogger().debug(
00097               "All backends failed locally to commit transaction "
00098                   + transactionId);
00099         return e;
00100       }
00101       finally
00102       {
00103         // Notify scheduler for completion
00104         drm.getScheduler().rollbackCompleted(transactionId);
00105         drm.completeTransaction(tid);
00106       }
00107       return Boolean.TRUE;
00108     }
00109     catch (SQLException e)
00110     {
00111       drm.getLogger().warn("SQLException while executing distributed rollback",
00112           e);
00113       throw e;
00114     }
00115     catch (RuntimeException re)
00116     {
00117       drm.getLogger().warn("Error while executing distributed rollback", re);
00118       throw new SQLException(re.getMessage());
00119     }
00120   }


変数

long org.objectweb.cjdbc.controller.virtualdatabase.protocol.Rollback.transactionId [private]
 

Rollback.java45 行で定義されています。


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0rc6に対してWed May 5 18:03:13 2004に生成されました。 doxygen 1.3.6