Mercurial > hg > blitz_stable
view src/org/dancres/blitz/remote/TxnGatewayImpl.java @ 23:b7e52953b7a6
Add some cache/memory statistics to help spot potential exhaustion and other tuning issues.
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Fri, 28 Aug 2009 17:23:33 +0100 |
parents | 3dc0c5604566 |
children |
line wrap: on
line source
package org.dancres.blitz.remote; import java.rmi.RemoteException; import net.jini.core.transaction.UnknownTransactionException; import net.jini.core.transaction.CannotJoinException; import net.jini.core.transaction.server.TransactionManager; import net.jini.core.transaction.server.TransactionParticipant; import net.jini.core.transaction.server.CrashCountException; import org.dancres.blitz.txn.TxnGateway; import org.dancres.blitz.txn.TxnId; /** "Glue" between the non-remote internals of Blitz and the outside (remote) world. */ class TxnGatewayImpl implements TxnGateway { private long theCrashCount = System.currentTimeMillis(); private TransactionParticipant theParticipantStub; TxnGatewayImpl(TransactionParticipant aStub) { theParticipantStub = aStub; } public void join(TxnId anId) throws UnknownTransactionException, CannotJoinException, CrashCountException, RemoteException { anId.getManager().join(anId.getId(), theParticipantStub, theCrashCount); } public int getState(TxnId anId) throws UnknownTransactionException, RemoteException { return anId.getManager().getState(anId.getId()); } }