Class AbstractJniRrdStrategy<D,​F>

    • Constructor Detail

      • AbstractJniRrdStrategy

        public AbstractJniRrdStrategy()
    • Method Detail

      • createGraph

        public java.io.InputStream createGraph​(java.lang.String command,
                                               java.io.File workDir)
                                        throws java.io.IOException,
                                               RrdException
        Creates an InputStream representing the bytes of a graph created from round robin data. It accepts an rrdtool graph command. The underlying implementation converts this command to a format appropriate for it . Executes the given graph command as process with workDir as the current directory. The output stream of the command (a PNG image) is copied to a the InputStream returned from the method.
        Specified by:
        createGraph in interface RrdStrategy<D,​F>
        Parameters:
        command - the command needed to create the graph
        workDir - the directory that all referenced files are relative to
        Returns:
        an input stream representing the bytes of a graph image as a PNG file
        Throws:
        java.io.IOException - if an IOError occurs
        RrdException - if an RRD error occurs
      • getGraphLeftOffset

        public int getGraphLeftOffset()

        getGraphLeftOffset

        Specified by:
        getGraphLeftOffset in interface RrdStrategy<D,​F>
        Returns:
        a int.
      • getGraphRightOffset

        public int getGraphRightOffset()

        getGraphRightOffset

        Specified by:
        getGraphRightOffset in interface RrdStrategy<D,​F>
        Returns:
        a int.
      • getStats

        public java.lang.String getStats()
        No stats are kept for this implementation.
        Specified by:
        getStats in interface RrdStrategy<D,​F>
        Returns:
        a String object.
      • getDefaultFileExtension

        public java.lang.String getDefaultFileExtension()

        getDefaultFileExtension

        Specified by:
        getDefaultFileExtension in interface RrdStrategy<D,​F>
        Returns:
        a String object.
      • createGraphReturnDetails

        public RrdGraphDetails createGraphReturnDetails​(java.lang.String command,
                                                        java.io.File workDir)
                                                 throws java.io.IOException,
                                                        RrdException
        Creates an RrdGraphDetails object representing the graph created from round robin data. It accepts an rrdtool graph command. The underlying implementation converts this command to a format appropriate for it .
        Specified by:
        createGraphReturnDetails in interface RrdStrategy<D,​F>
        Parameters:
        command - the command needed to create the graph
        workDir - the directory that all referenced files are relative to
        Returns:
        details for the graph including an InputStream, any PRINTed lines, and graph dimensions.
        Throws:
        java.io.IOException - if an IOError occurs
        RrdException - if an RRD error occurs
      • promoteEnqueuedFiles

        public void promoteEnqueuedFiles​(java.util.Collection<java.lang.String> rrdFiles)
        In the event that this is a queuing implementation of the RrdStrategy. This method causes all queued but not yet written data to be to the rrd files as soon as possible.
        Specified by:
        promoteEnqueuedFiles in interface RrdStrategy<D,​F>
        Parameters:
        rrdFiles - a Collection object.