public CongestionController()

in bulkimport/src/main/java/com/microsoft/azure/documentdb/bulkimport/CongestionController.java [141:153]


    public CongestionController(ListeningExecutorService executor, int partitionThroughput, String partitionKeyRangeId,
            BatchInserter batchInserter, Integer startingDegreeOfConcurrency) {
        this.partitionKeyRangeId = partitionKeyRangeId;
        this.batchInserter = batchInserter;

        // Starting the semaphore with 'StartingDegreeOfConcurrency' count and will release when no throttles are received
        // and decrease when we get throttled.
        this.degreeOfConcurrency = startingDegreeOfConcurrency != null ? startingDegreeOfConcurrency: STARTING_DEGREE_OF_CONCURRENCY;
        this.throttleSemaphore = new Semaphore(this.degreeOfConcurrency);
        this.aggregatedInsertMetrics = new InsertMetrics();
        this.executor = executor;
        this.partitionThroughput = partitionThroughput;
    }