view src/org/dancres/blitz/TxnControl.java @ 4:d3ec5ebc3dba

Fix up a small race-condition and and a todo for thread-safety in MatchSetImpl.
author Dan Creswell <dan.creswell@gmail.com>
date Sat, 25 Apr 2009 08:38:27 +0100
parents 3dc0c5604566
children
line wrap: on
line source

package org.dancres.blitz;

import java.io.IOException;

import java.rmi.RemoteException;

import net.jini.core.transaction.server.TransactionManager;
import net.jini.core.transaction.UnknownTransactionException;
import net.jini.core.transaction.TransactionException;

/**
   Transactional operations are controlled via this interface.
 */
public interface TxnControl {
    public int prepare(TransactionManager aMgr, long anId)
        throws UnknownTransactionException, RemoteException;

    public void commit(TransactionManager aMgr, long anId)
        throws UnknownTransactionException, RemoteException;

    public void abort(TransactionManager aMgr, long anId)
        throws UnknownTransactionException, RemoteException;

    public int prepareAndCommit(TransactionManager aMgr, long anId)
        throws UnknownTransactionException, RemoteException;

    public void requestSnapshot() throws TransactionException, IOException;

    public void backup(String aDir) throws IOException;
}