Class Route

java.lang.Object
com.redis.vl.extensions.router.Route

public class Route extends Object
Model representing a routing path with associated metadata and thresholds.

Ported from Python: redisvl/extensions/router/schema.py:12

  • Constructor Details

    • Route

      public Route()
  • Method Details

    • validate

      public void validate()
      Validate the route configuration.
      Throws:
      IllegalArgumentException - if validation fails
    • toDict

      public Map<String,Object> toDict()
      Convert route to a map for JSON serialization. Ported from Python: model_to_dict(route)
      Returns:
      Map representation of the route
    • toJson

      public String toJson()
      Convert route to JSON string.
      Returns:
      JSON representation of the route
    • fromDict

      public static Route fromDict(Map<String,Object> dict)
      Create route from map representation. Ported from Python: Route(**dict)
      Parameters:
      dict - Map containing route data
      Returns:
      Route instance
    • fromJson

      public static Route fromJson(String json)
      Create route from JSON string.
      Parameters:
      json - JSON string
      Returns:
      Route instance