org.neo4j.kernel.impl.transaction.xaframework
Class XaResourceHelpImpl
java.lang.Object
org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl
- All Implemented Interfaces:
- XAResource, XaResource
public abstract class XaResourceHelpImpl
- extends Object
- implements XaResource
Help implementation of the XAResource interface. See
XaConnectionHelpImpl
for more information.
Fields inherited from interface javax.transaction.xa.XAResource |
TMENDRSCAN, TMFAIL, TMJOIN, TMNOFLAGS, TMONEPHASE, TMRESUME, TMSTARTRSCAN, TMSUCCESS, TMSUSPEND, XA_OK, XA_RDONLY |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XaResourceHelpImpl
protected XaResourceHelpImpl(XaResourceManager xaRm,
byte[] branchId)
getCompletedTx
public XaTransaction getCompletedTx()
- If the transaction commited successfully this method will return the
transaction.
- Returns:
- transaction if completed else
null
isSameRM
public abstract boolean isSameRM(XAResource xares)
- Should return true if
xares
is the same resource as
this
.
- Specified by:
isSameRM
in interface XAResource
- Returns:
- true if the resource is same
commit
public void commit(Xid xid,
boolean onePhase)
throws XAException
- Specified by:
commit
in interface XAResource
- Throws:
XAException
end
public void end(Xid xid,
int flags)
throws XAException
- Specified by:
end
in interface XAResource
- Throws:
XAException
forget
public void forget(Xid xid)
throws XAException
- Specified by:
forget
in interface XAResource
- Throws:
XAException
getTransactionTimeout
public int getTransactionTimeout()
- Specified by:
getTransactionTimeout
in interface XAResource
setTransactionTimeout
public boolean setTransactionTimeout(int timeout)
- Specified by:
setTransactionTimeout
in interface XAResource
prepare
public int prepare(Xid xid)
throws XAException
- Specified by:
prepare
in interface XAResource
- Throws:
XAException
recover
public Xid[] recover(int flag)
throws XAException
- Specified by:
recover
in interface XAResource
- Throws:
XAException
rollback
public void rollback(Xid xid)
throws XAException
- Specified by:
rollback
in interface XAResource
- Throws:
XAException
start
public void start(Xid xid,
int flags)
throws XAException
- Specified by:
start
in interface XAResource
- Throws:
XAException
setBranchId
public void setBranchId(byte[] branchId)
- Specified by:
setBranchId
in interface XaResource
getBranchId
public byte[] getBranchId()
- Specified by:
getBranchId
in interface XaResource
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.