com.bigdata.counters
Class ActiveProcess

java.lang.Object
  extended by com.bigdata.counters.ActiveProcess

public class ActiveProcess
extends Object

Command manages the execution and termination of a native process and an object reading the output of that process.

Version:
$Id: ActiveProcess.java 2265 2009-10-26 12:51:06Z thompsonbry $
Author:
Bryan Thompson

Field Summary
protected  InputStream is
           
protected static org.apache.log4j.Logger log
           
protected  Process process
           
protected  Future readerFuture
           
protected  ExecutorService readService
          Used to read is and aggregate the performance data reported by the process.
 
Constructor Summary
ActiveProcess(List<String> command, AbstractProcessCollector collector)
           
 
Method Summary
 boolean isAlive()
          Return true unless the process is known to be dead.
 void start(AbstractProcessReader processReader)
          Attaches the reader to the process, which was started by the ctor and is already running.
 void stop()
          Stops the process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log

readService

protected final ExecutorService readService
Used to read is and aggregate the performance data reported by the process.


process

protected Process process

is

protected InputStream is

readerFuture

protected volatile Future readerFuture
Constructor Detail

ActiveProcess

public ActiveProcess(List<String> command,
                     AbstractProcessCollector collector)
Parameters:
command - The command to be executed. See ProcessBuilder.command(List).
collector -
Method Detail

start

public void start(AbstractProcessReader processReader)
Attaches the reader to the process, which was started by the ctor and is already running.

Parameters:
processReader - The reader.

stop

public void stop()
Stops the process


isAlive

public boolean isAlive()
Return true unless the process is known to be dead.



Copyright © 2006-2009 SYSTAP, LLC. All Rights Reserved.