Interface LoadBalancingStrategy

All Known Implementing Classes:
LeastConnectedLoadBalancingStrategy

public interface LoadBalancingStrategy
A facility to select most appropriate reader or writer among the given addresses for request processing.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.neo4j.driver.internal.BoltServerAddress
    selectReader(List<org.neo4j.driver.internal.BoltServerAddress> knownReaders)
    Select most appropriate read address from the given array of addresses.
    org.neo4j.driver.internal.BoltServerAddress
    selectWriter(List<org.neo4j.driver.internal.BoltServerAddress> knownWriters)
    Select most appropriate write address from the given array of addresses.
  • Method Details

    • selectReader

      org.neo4j.driver.internal.BoltServerAddress selectReader(List<org.neo4j.driver.internal.BoltServerAddress> knownReaders)
      Select most appropriate read address from the given array of addresses.
      Parameters:
      knownReaders - array of all known readers.
      Returns:
      most appropriate reader or null if it can't be selected.
    • selectWriter

      org.neo4j.driver.internal.BoltServerAddress selectWriter(List<org.neo4j.driver.internal.BoltServerAddress> knownWriters)
      Select most appropriate write address from the given array of addresses.
      Parameters:
      knownWriters - array of all known writers.
      Returns:
      most appropriate writer or null if it can't be selected.