- All Known Implementing Classes:
ClusterRoutingTable
public interface RoutingTable
-
Method Summary
Modifier and TypeMethodDescriptionorg.neo4j.driver.internal.DatabaseName
database()
long
void
forget
(org.neo4j.driver.internal.BoltServerAddress address) void
forgetWriter
(org.neo4j.driver.internal.BoltServerAddress toRemove) boolean
hasBeenStaleFor
(long staleRoutingTableTimeout) boolean
isStaleFor
(AccessMode mode) boolean
List<org.neo4j.driver.internal.BoltServerAddress>
readers()
Returns an immutable list of reader addresses.void
replaceRouterIfPresent
(org.neo4j.driver.internal.BoltServerAddress oldRouter, org.neo4j.driver.internal.BoltServerAddress newRouter) List<org.neo4j.driver.internal.BoltServerAddress>
routers()
Returns an immutable list of router addresses.Set<org.neo4j.driver.internal.BoltServerAddress>
servers()
Returns an immutable unordered set of all addresses known by this routing table.void
update
(ClusterComposition cluster) List<org.neo4j.driver.internal.BoltServerAddress>
writers()
Returns an immutable list of writer addresses.
-
Method Details
-
isStaleFor
-
hasBeenStaleFor
boolean hasBeenStaleFor(long staleRoutingTableTimeout) -
update
-
forget
void forget(org.neo4j.driver.internal.BoltServerAddress address) -
readers
List<org.neo4j.driver.internal.BoltServerAddress> readers()Returns an immutable list of reader addresses.- Returns:
- the immutable list of reader addresses.
-
writers
List<org.neo4j.driver.internal.BoltServerAddress> writers()Returns an immutable list of writer addresses.- Returns:
- the immutable list of write addresses.
-
routers
List<org.neo4j.driver.internal.BoltServerAddress> routers()Returns an immutable list of router addresses.- Returns:
- the immutable list of router addresses.
-
servers
Set<org.neo4j.driver.internal.BoltServerAddress> servers()Returns an immutable unordered set of all addresses known by this routing table. This includes all router, reader, writer and disused addresses.- Returns:
- the immutable set of all addresses.
-
database
org.neo4j.driver.internal.DatabaseName database() -
forgetWriter
void forgetWriter(org.neo4j.driver.internal.BoltServerAddress toRemove) -
replaceRouterIfPresent
void replaceRouterIfPresent(org.neo4j.driver.internal.BoltServerAddress oldRouter, org.neo4j.driver.internal.BoltServerAddress newRouter) -
preferInitialRouter
boolean preferInitialRouter() -
expirationTimestamp
long expirationTimestamp()
-