class SingleThreadTransactionManager extends TransactionManager {

    private final BitField bf = new BitField(8);
    private AOTransaction[] transactions;
    private int currentTransactionCount;

    public SingleThreadTransactionManager(AOTransactionEngine te) {
        super(te);
        transactions = new AOTransaction[8];
    }

    @Override
    public AOTransaction removeTransaction(long tid, int bitIndex) {
        currentTransactionCount--;
        bf.clear(bitIndex);
        AOTransaction t = transactions[bitIndex];
        transactions[bitIndex] = null;
        super.removeTransaction(t);
        return t;
    }

    @Override
    public void addTransaction(AOTransaction t) {
        currentTransactionCount++;
        int index = bf.nextClearBit(0);
        bf.set(index);
        if (index >= transactions.length) {
            AOTransaction[] newTransactions = new AOTransaction[transactions.length * 2];
            System.arraycopy(transactions, 0, newTransactions, 0, transactions.length);
            transactions = newTransactions;
        }
        t.setBitIndex(index);
        transactions[index] = t;
    }

    @Override
    public void currentTransactions(List<AOTransaction> list) {<FILL_FUNCTION_BODY>}

    @Override
    public int currentTransactionCount() {
        return currentTransactionCount;
    }
}

        AOTransaction[] transactions = this.transactions;
        for (int i = 0, length = transactions.length; i < length; i++) {
            AOTransaction t = transactions[i];
            if (t != null)
                list.add(t);
        }
    
<methods>public void <init>(com.lealone.transaction.aote.AOTransactionEngine) ,public abstract void addTransaction(com.lealone.transaction.aote.AOTransaction) ,public static com.lealone.transaction.aote.tm.TransactionManager create(com.lealone.transaction.aote.AOTransactionEngine, boolean) ,public abstract int currentTransactionCount() ,public abstract void currentTransactions(List<com.lealone.transaction.aote.AOTransaction>) ,public abstract com.lealone.transaction.aote.AOTransaction removeTransaction(long, int) <variables>protected final non-sealed com.lealone.transaction.aote.AOTransactionEngine te