class TransactionHandleRegistry implements TransactionRegistry {

    @Override
    public long begin( TransactionHandle handle )
    {
        long id = idGenerator.incrementAndGet();
        if ( null == registry.putIfAbsent( id, new ActiveTransaction( handle ) ) )
        {
            return id;
        }
        else
        {
            throw new IllegalStateException( "Attempt to begin transaction for id that was already registered" );
        }
    }

    public  TransactionHandleRegistry( Clock clock, long timeoutMillis, LogProvider logProvider );

}