class TransactionQueue {

    public void queue( TransactionToApply transaction ) throws Exception
    {
        if ( isEmpty() )
        {
            first = last = transaction;
        }
        else
        {
            last.next( transaction );
            last = transaction;
        }
        if ( ++size == maxSize )
        {
            empty();
        }
    }

    public  TransactionQueue( int maxSize, Applier applier );

}