Untitled

Anonymous
plain_text
06/23/2023 6:58 AM
840 B
18
Indexable
 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();
Editor is loading...