Class DefaultViewRow

    • Method Detail

      • id

        public String id()
        Description copied from interface: ViewRow
        The id of the document, if not reduced.
        Specified by:
        id in interface ViewRow
        Returns:
        the id of the document.
      • key

        public Object key()
        Description copied from interface: ViewRow
        The key of the row index. The object can be any valid JSON object, including JsonArray or JsonObject.
        Specified by:
        key in interface ViewRow
        Returns:
        the key.
      • value

        public Object value()
        Description copied from interface: ViewRow
        The value of the row index. The object can be any valid JSON object, including JsonArray or JsonObject.
        Specified by:
        value in interface ViewRow
        Returns:
        the value.
      • document

        public JsonDocument document​(long timeout,
                                     TimeUnit timeUnit)
        Description copied from interface: ViewRow
        Load the underlying document, if not reduced with a custom timeout. This method throws: - TimeoutException wrapped in a RuntimeException: If the timeout is exceeded. - BackpressureException: If the incoming request rate is too high to be processed. - IllegalStateException: If the view is reduced and the ID is null. - TranscodingException: If the response document could not be decoded.
        Specified by:
        document in interface ViewRow
        Parameters:
        timeout - the custom timeout.
        timeUnit - the time unit for the custom timeout.
        Returns:
        the loaded document, null if not found.
      • document

        public <D extends Document<?>> D document​(Class<D> target)
        Description copied from interface: ViewRow
        Load the underlying document, if not reduced with the default view timeout. This method throws: - TimeoutException wrapped in a RuntimeException: If the timeout is exceeded. - BackpressureException: If the incoming request rate is too high to be processed. - IllegalStateException: If the view is reduced and the ID is null. - TranscodingException: If the response document could not be decoded.
        Specified by:
        document in interface ViewRow
        Parameters:
        target - the custom target document type.
        Returns:
        the loaded document, null if not found.
      • document

        public <D extends Document<?>> D document​(Class<D> target,
                                                  long timeout,
                                                  TimeUnit timeUnit)
        Description copied from interface: ViewRow
        Load the underlying document, if not reduced with a custom timeout. This method throws: - TimeoutException wrapped in a RuntimeException: If the timeout is exceeded. - BackpressureException: If the incoming request rate is too high to be processed. - IllegalStateException: If the view is reduced and the ID is null. - TranscodingException: If the response document could not be decoded.
        Specified by:
        document in interface ViewRow
        Parameters:
        target - the custom target document type.
        timeout - the custom timeout.
        timeUnit - the time unit for the custom timeout.
        Returns:
        the loaded document, null if not found.