Class AbstractJSONAPIResult

    • Constructor Detail

      • AbstractJSONAPIResult

        public AbstractJSONAPIResult()
    • Method Detail

      • getQueryTime

        public Long getQueryTime()
        Description copied from interface: JSONAPIResult
        Time to perform the requested action or command in SOLR
        Specified by:
        getQueryTime in interface JSONAPIResult
        Returns:
        Number of milliseconds
      • getStatus

        public Long getStatus()
        Description copied from interface: JSONAPIResult
        HTTP Response code But for 200, that is being returned as 0
        Specified by:
        getStatus in interface JSONAPIResult
        Returns:
        Number representing an HTTP Status
      • getCores

        public List<String> getCores()
        Description copied from interface: JSONAPIResult
        Name of the cores managed by SOLR
        Specified by:
        getCores in interface JSONAPIResult
        Returns:
        A list with the names of the cores
      • getCoresInfo

        public Map<String,​Map<String,​Object>> getCoresInfo()
        Description copied from interface: JSONAPIResult
        Information from the cores to be exposed in JMX Beans The names and the structure of the properties depend on the type of the Action
        Specified by:
        getCoresInfo in interface JSONAPIResult
        Returns:
        Core information by core name
      • processJson

        protected void processJson​(org.json.JSONObject json)
                            throws org.json.JSONException
        Parses the JSON to set this Java Object values
        Parameters:
        json - JSONObject returned by SOLR API
        Throws:
        org.json.JSONException
      • getPropertyValueMap

        protected Map<String,​Object> getPropertyValueMap​(org.json.JSONObject json)
                                                        throws org.json.JSONException
        Creates a property-value Map from a JSON Object containing properties and values This method provides the right input for MBeans to expose the SOLR response values from the Response
        Parameters:
        json - Simple JSON Object containing only properties
        Returns:
        Property-value Map
        Throws:
        org.json.JSONException
      • processCoresInfoJson

        protected abstract void processCoresInfoJson​(org.json.JSONObject json)
                                              throws org.json.JSONException
        Parses the JSON to set this Java Object values related to Core Information
        Parameters:
        json - JSONObject returned by SOLR API
        Throws:
        org.json.JSONException