Class GangliaContext

    • Field Detail

      • buffer

        protected byte[] buffer
      • offset

        protected int offset
      • metricsServers

        protected java.util.List<? extends java.net.SocketAddress> metricsServers
      • datagramSocket

        protected java.net.DatagramSocket datagramSocket
    • Constructor Detail

      • GangliaContext

        @Private
        public GangliaContext()
        Creates a new instance of GangliaContext
    • Method Detail

      • emitRecord

        @Private
        public void emitRecord​(java.lang.String contextName,
                               java.lang.String recordName,
                               OutputRecord outRec)
                        throws java.io.IOException
        Description copied from class: AbstractMetricsContext
        Sends a record to the metrics system.
        Specified by:
        emitRecord in class AbstractMetricsContext
        Throws:
        java.io.IOException
      • emitMetric

        protected void emitMetric​(java.lang.String name,
                                  java.lang.String type,
                                  java.lang.String value)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getUnits

        protected java.lang.String getUnits​(java.lang.String metricName)
      • getSlope

        protected int getSlope​(java.lang.String metricName)
      • getTmax

        protected int getTmax​(java.lang.String metricName)
      • getDmax

        protected int getDmax​(java.lang.String metricName)
      • xdr_string

        protected void xdr_string​(java.lang.String s)
        Puts a string into the buffer by first writing the size of the string as an int, followed by the bytes of the string, padded if necessary to a multiple of 4.
      • xdr_int

        protected void xdr_int​(int i)
        Puts an integer into the buffer as 4 bytes, big-endian.