class TransactionCommittingResponseUnpacker extends LifecycleAdapter implements ResponseUnpacker {

    @Override
    public void unpackResponse( Response<?> response, TxHandler txHandler ) throws Exception
    {
        if ( stopped )
        {
            throw new IllegalStateException( "Component is currently stopped" );
        }

        BatchingResponseHandler responseHandler = new BatchingResponseHandler( maxBatchSize,
                batchCommitter, obligationFulfiller, txHandler, versionContextSupplier, log );
        try
        {
            response.accept( responseHandler );
        }
        finally
        {
            responseHandler.applyQueuedTransactions();
        }
    }

    public  TransactionCommittingResponseUnpacker( DependencyResolver dependencies, int maxBatchSize,
            long idReuseSafeZoneTime );
    public  TransactionCommittingResponseUnpacker( Dependencies dependencies, int maxBatchSize,
            long idReuseSafeZoneTime );

}