Class PreparedQueryExecuteOptions


  • public class PreparedQueryExecuteOptions
    extends Object
    Options used to execute prepared query
    Author:
    Ruslan Sennov
    • Constructor Detail

      • PreparedQueryExecuteOptions

        public PreparedQueryExecuteOptions()
        Default constructor
      • PreparedQueryExecuteOptions

        public PreparedQueryExecuteOptions​(JsonObject json)
        Constructor from JSON
        Parameters:
        json - the JSON
    • Method Detail

      • toJson

        public JsonObject toJson()
        Convert to JSON
        Returns:
        the JSON
      • getNear

        public String getNear()
        Get node name for sorting the list in ascending order based on the estimated round trip time from that node.
        Returns:
        the node name
      • setNear

        public PreparedQueryExecuteOptions setNear​(String near)
        Set node name for sorting the list in ascending order based on the estimated round trip time from that node. Passing _agent will use the agent's node for the sort. If this is not present, the default behavior will shuffle the nodes randomly each time the query is executed.
        Parameters:
        near - the node name
        Returns:
        reference to this, for fluency
      • getLimit

        public int getLimit()
        Get the size of the list to the given number of nodes. This is applied after any sorting or shuffling.
        Returns:
        the size of the list to the given number of nodes
      • setLimit

        public PreparedQueryExecuteOptions setLimit​(int limit)
        Set the size of the list to the given number of nodes. This is applied after any sorting or shuffling.
        Parameters:
        limit - the size of the list to the given number of nodes
        Returns:
        reference to this, for fluency