Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
630 B
3
Indexable
Never
 DriverConfigLoader configLoader = DriverConfigLoader.programmaticBuilder()
                .withString(DefaultDriverOption.REQUEST_THROTTLER_CLASS, "com.datastax.oss.driver.internal.core.util.concurrent.SemaphoreBasedRequestThrottler")
                .withInt(DefaultDriverOption.CONCURRENT_REQUESTS_LIMIT, 100)
                .withDuration(DefaultDriverOption.THROTTLER_UPPER_BOUND, Duration.ofMillis(10))
                .build();

        // Create the CqlSession using the configured driver options
        CqlSession session = CqlSession.builder()
                .withConfigLoader(configLoader)
                .build();