java.lang.Object
org.neo4j.driver.internal.cluster.ClusterRoutingTable
- All Implemented Interfaces:
RoutingTable
-
Constructor Summary
ConstructorDescriptionClusterRoutingTable
(org.neo4j.driver.internal.DatabaseName ofDatabase, Clock clock, org.neo4j.driver.internal.BoltServerAddress... routingAddresses) -
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 extraTime) 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.toString()
void
update
(ClusterComposition cluster) List<org.neo4j.driver.internal.BoltServerAddress>
writers()
Returns an immutable list of writer addresses.
-
Constructor Details
-
ClusterRoutingTable
public ClusterRoutingTable(org.neo4j.driver.internal.DatabaseName ofDatabase, Clock clock, org.neo4j.driver.internal.BoltServerAddress... routingAddresses)
-
-
Method Details
-
isStaleFor
- Specified by:
isStaleFor
in interfaceRoutingTable
-
hasBeenStaleFor
public boolean hasBeenStaleFor(long extraTime) - Specified by:
hasBeenStaleFor
in interfaceRoutingTable
-
update
- Specified by:
update
in interfaceRoutingTable
-
forget
public void forget(org.neo4j.driver.internal.BoltServerAddress address) - Specified by:
forget
in interfaceRoutingTable
-
readers
Description copied from interface:RoutingTable
Returns an immutable list of reader addresses.- Specified by:
readers
in interfaceRoutingTable
- Returns:
- the immutable list of reader addresses.
-
writers
Description copied from interface:RoutingTable
Returns an immutable list of writer addresses.- Specified by:
writers
in interfaceRoutingTable
- Returns:
- the immutable list of write addresses.
-
routers
Description copied from interface:RoutingTable
Returns an immutable list of router addresses.- Specified by:
routers
in interfaceRoutingTable
- Returns:
- the immutable list of router addresses.
-
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 interfaceRoutingTable
- Returns:
- the immutable set of all addresses.
-
database
public org.neo4j.driver.internal.DatabaseName database()- Specified by:
database
in interfaceRoutingTable
-
forgetWriter
public void forgetWriter(org.neo4j.driver.internal.BoltServerAddress toRemove) - Specified by:
forgetWriter
in interfaceRoutingTable
-
replaceRouterIfPresent
public void replaceRouterIfPresent(org.neo4j.driver.internal.BoltServerAddress oldRouter, org.neo4j.driver.internal.BoltServerAddress newRouter) - Specified by:
replaceRouterIfPresent
in interfaceRoutingTable
-
preferInitialRouter
public boolean preferInitialRouter()- Specified by:
preferInitialRouter
in interfaceRoutingTable
-
expirationTimestamp
public long expirationTimestamp()- Specified by:
expirationTimestamp
in interfaceRoutingTable
-
toString
-