class CassandraTokenSplitManager {

    public long getTotalPartitionsCount(String keyspace, String table, Optional<Long> sessionSplitsPerNode)
    {
        if (sessionSplitsPerNode.isPresent()) {
            return sessionSplitsPerNode.get();
        }
        if (configSplitsPerNode.isPresent()) {
            return configSplitsPerNode.get();
        }
        List<SizeEstimate> estimates = session.getSizeEstimates(keyspace, table);
        return estimates.stream()
                .mapToLong(SizeEstimate::getPartitionsCount)
                .sum();
    }

    @Inject public  CassandraTokenSplitManager(CassandraSession session, CassandraClientConfig config);
    public  CassandraTokenSplitManager(CassandraSession session, int splitSize, Optional<Long> configSplitsPerNode);

}