Class GenericAnalyticsRequest

    • Constructor Detail

      • GenericAnalyticsRequest

        protected GenericAnalyticsRequest​(String query,
                                          boolean jsonFormat,
                                          String bucket,
                                          String username,
                                          String password,
                                          String targetNode,
                                          int priority)
    • Method Detail

      • query

        public String query()
      • priority

        public int priority()
      • isJsonFormat

        public boolean isJsonFormat()
      • simpleStatement

        public static GenericAnalyticsRequest simpleStatement​(String statement,
                                                              String bucket,
                                                              String password)
        Creates a GenericAnalyticsRequest and mark it as containing a single simple statement (e.g. "SELECT * FROM default").
        Parameters:
        statement - the Analytics query statement to perform.
        bucket - the bucket on which to search.
        password - the password for the target bucket.
        Returns:
        a GenericAnalyticsRequest for this simple statement.
      • simpleStatement

        public static GenericAnalyticsRequest simpleStatement​(String statement,
                                                              String bucket,
                                                              String username,
                                                              String password)
        Creates a GenericAnalyticsRequest and mark it as containing a single simple statement (e.g. "SELECT * FROM default").
        Parameters:
        statement - the Analytics query statement to perform.
        bucket - the bucket on which to search.
        username - the user authorized for bucket access.
        password - the password for the user.
        Returns:
        a GenericAnalyticsRequest for this simple statement.
      • jsonQuery

        public static GenericAnalyticsRequest jsonQuery​(String jsonQuery,
                                                        String bucket,
                                                        String username,
                                                        String password,
                                                        int priority)
        Create a GenericAnalyticsRequest and mark it as containing a full Analytics query in Json form (including additional query parameters). The simplest form of such a query is a single statement encapsulated in a json query object:
        {"statement":"SELECT * FROM default"}
        .
        Parameters:
        jsonQuery - the Analytics query in json form.
        bucket - the bucket on which to perform the query.
        password - the password for the target bucket.
        Returns:
        a GenericAnalyticsRequest for this full query.
      • jsonQuery

        public static GenericAnalyticsRequest jsonQuery​(String jsonQuery,
                                                        String bucket,
                                                        String username,
                                                        String password)
        Create a GenericAnalyticsRequest and mark it as containing a full Analytics query in Json form (including additional query parameters). The simplest form of such a query is a single statement encapsulated in a json query object:
        {"statement":"SELECT * FROM default"}
        .
        Parameters:
        jsonQuery - the Analytics query in json form.
        bucket - the bucket on which to perform the query.
        password - the password for the target bucket.
        Returns:
        a GenericAnalyticsRequest for this full query.
      • jsonQuery

        public static GenericAnalyticsRequest jsonQuery​(String jsonQuery,
                                                        String bucket,
                                                        String username,
                                                        String password,
                                                        String targetNode)
        Create a GenericAnalyticsRequest and mark it as containing a full Analytics query in Json form (including additional query parameters). The simplest form of such a query is a single statement encapsulated in a json query object:
        {"statement":"SELECT * FROM default"}
        .
        Parameters:
        jsonQuery - the Analytics query in json form.
        bucket - the bucket on which to perform the query.
        username - the username authorized for bucket access.
        password - the password for the user.
        targetNode - the node on which to execute this request (or null to let the core locate and choose one).
        Returns:
        a GenericAnalyticsRequest for this full query.