Class ClusterRoutingTable

java.lang.Object
org.neo4j.driver.internal.cluster.ClusterRoutingTable
All Implemented Interfaces:
RoutingTable

public class ClusterRoutingTable extends Object implements RoutingTable
  • Constructor Details

    • ClusterRoutingTable

      public ClusterRoutingTable(org.neo4j.driver.internal.DatabaseName ofDatabase, Clock clock, org.neo4j.driver.internal.BoltServerAddress... routingAddresses)
  • Method Details

    • isStaleFor

      public boolean isStaleFor(AccessMode mode)
      Specified by:
      isStaleFor in interface RoutingTable
    • hasBeenStaleFor

      public boolean hasBeenStaleFor(long extraTime)
      Specified by:
      hasBeenStaleFor in interface RoutingTable
    • update

      public void update(ClusterComposition cluster)
      Specified by:
      update in interface RoutingTable
    • forget

      public void forget(org.neo4j.driver.internal.BoltServerAddress address)
      Specified by:
      forget in interface RoutingTable
    • readers

      public List<org.neo4j.driver.internal.BoltServerAddress> readers()
      Description copied from interface: RoutingTable
      Returns an immutable list of reader addresses.
      Specified by:
      readers in interface RoutingTable
      Returns:
      the immutable list of reader addresses.
    • writers

      public List<org.neo4j.driver.internal.BoltServerAddress> writers()
      Description copied from interface: RoutingTable
      Returns an immutable list of writer addresses.
      Specified by:
      writers in interface RoutingTable
      Returns:
      the immutable list of write addresses.
    • routers

      public List<org.neo4j.driver.internal.BoltServerAddress> routers()
      Description copied from interface: RoutingTable
      Returns an immutable list of router addresses.
      Specified by:
      routers in interface RoutingTable
      Returns:
      the immutable list of router addresses.
    • servers

      public Set<org.neo4j.driver.internal.BoltServerAddress> servers()
      Description copied from interface: RoutingTable
      Returns an immutable unordered set of all addresses known by this routing table. This includes all router, reader, writer and disused addresses.
      Specified by:
      servers in interface RoutingTable
      Returns:
      the immutable set of all addresses.
    • database

      public org.neo4j.driver.internal.DatabaseName database()
      Specified by:
      database in interface RoutingTable
    • forgetWriter

      public void forgetWriter(org.neo4j.driver.internal.BoltServerAddress toRemove)
      Specified by:
      forgetWriter in interface RoutingTable
    • replaceRouterIfPresent

      public void replaceRouterIfPresent(org.neo4j.driver.internal.BoltServerAddress oldRouter, org.neo4j.driver.internal.BoltServerAddress newRouter)
      Specified by:
      replaceRouterIfPresent in interface RoutingTable
    • preferInitialRouter

      public boolean preferInitialRouter()
      Specified by:
      preferInitialRouter in interface RoutingTable
    • expirationTimestamp

      public long expirationTimestamp()
      Specified by:
      expirationTimestamp in interface RoutingTable
    • toString

      public String toString()
      Overrides:
      toString in class Object