net.kwfgrid.gwes.monitor
Class GangliaCustomMetricUpdater

java.lang.Object
  extended by java.lang.Thread
      extended by net.kwfgrid.gwes.monitor.GangliaCustomMetricUpdater
All Implemented Interfaces:
Runnable

public class GangliaCustomMetricUpdater
extends Thread

Version:
$Id: GangliaCustomMetricUpdater.java 1490 2011-02-18 13:20:36Z hoheisel $
Author:
Andreas Hoheisel (www.andreas-hoheisel.de)

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
GangliaCustomMetricUpdater(GWESEngine engine)
          Constructor
 
Method Summary
static void closeProcessStreams(Process p)
          Close process streams to avoid "too many open files" issue.
 void run()
          Start the thread.
protected  String send(String name, String value, String type, String unit)
          Send value to ganglia
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GangliaCustomMetricUpdater

public GangliaCustomMetricUpdater(GWESEngine engine)
Constructor

Parameters:
engine -
Method Detail

run

public final void run()
Start the thread.

Specified by:
run in interface Runnable
Overrides:
run in class Thread

send

protected String send(String name,
                      String value,
                      String type,
                      String unit)
               throws IOException
Send value to ganglia

Parameters:
name -
value -
type -
unit -
Returns:
Throws:
IOException

closeProcessStreams

public static void closeProcessStreams(Process p)
                                throws IOException
Close process streams to avoid "too many open files" issue.

Parameters:
p -
Throws:
IOException


Copyright © 2005-2011 Fraunhofer FIRST. All Rights Reserved.