Record Class RouteMessage

java.lang.Object
java.lang.Record
org.neo4j.driver.internal.messaging.request.RouteMessage
All Implemented Interfaces:
Message

public record RouteMessage(Map<String,Value> routingContext, Set<Bookmark> bookmarks, String databaseName, String impersonatedUser) extends Record implements Message
From the application point of view it is not interesting to know about the role a member plays in the cluster. Instead, the application needs to know which instance can provide the wanted service.

This message is used to fetch this routing information.

  • Field Details

  • Constructor Details

    • RouteMessage

      public RouteMessage(Map<String,Value> routingContext, Set<Bookmark> bookmarks, String databaseName, String impersonatedUser)
      Constructor
      Parameters:
      routingContext - The routing context used to define the routing table. Multi-datacenter deployments is one of its use cases.
      bookmarks - The bookmarks used when getting the routing table.
      databaseName - The name of the database to get the routing table for.
      impersonatedUser - The name of the impersonated user to get the routing table for, should be null for non-impersonated requests
  • Method Details

    • signature

      public byte signature()
      Specified by:
      signature in interface Message
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • routingContext

      public Map<String,Value> routingContext()
      Returns the value of the routingContext record component.
      Returns:
      the value of the routingContext record component
    • bookmarks

      public Set<Bookmark> bookmarks()
      Returns the value of the bookmarks record component.
      Returns:
      the value of the bookmarks record component
    • databaseName

      public String databaseName()
      Returns the value of the databaseName record component.
      Returns:
      the value of the databaseName record component
    • impersonatedUser

      public String impersonatedUser()
      Returns the value of the impersonatedUser record component.
      Returns:
      the value of the impersonatedUser record component