com.sun.faban.harness.tools
Class OracleTool

java.lang.Object
  extended by com.sun.faban.harness.tools.OracleTool
All Implemented Interfaces:
Tool
Direct Known Subclasses:
Awr, Statspack

Deprecated.

@Deprecated
public abstract class OracleTool
extends Object
implements Tool

OracleTool is an abstract class for Oracle tools to extend. It provides the basic functionality typical Oracle tools.

Author:
Akara Sucharitakul
See Also:
Tool

Constructor Summary
OracleTool()
          Deprecated.  
 
Method Summary
 void configure(String tool, List<String> argList, String path, String outDir, String host, String masterhost, CmdAgentImpl cmdAgent, CountDownLatch latch)
          Deprecated. Configures the Oracle tool.
protected  void finish()
          Deprecated. Finishes up the Oracle tool.
protected  String getLogFile()
          Deprecated. Obtains the temporary log file name.
protected  String getOutputFile(String outDir, String host)
          Deprecated. Obtains the final output file name.
protected abstract  String getReportCommand(String snapId, String snapId1, String outputFile)
          Deprecated. Creates a sqlplus command to create a tool report.
protected abstract  String getSnapCommand()
          Deprecated. Creates a sqlplus command to create tool snapshot.
 void kill()
          Deprecated. This method is required by the Tool API.
protected  String parseSnapId(byte[] output)
          Deprecated. The parseSnapId method parses the sqlplus stdout and finds the snapshot just taken.
protected  void start()
          Deprecated. The Runnable.run() is used to really start the tool after the delay.
 boolean start(int delay)
          Deprecated. This method is responsible for starting up the Oracle tool.
 boolean start(int delay, int duration)
          Deprecated. This method is responsible for starting up the Oracle tool and stopping it after the duration specified.
 void stop()
          Deprecated. This method is responsible for stopping the tool.
protected  void stop(boolean warn)
          Deprecated. This method is responsible for stopping the tool utility.
protected static void xferFile(String srcFile, String destFile)
          Deprecated. Transfers the tool output file back to the master.
protected  void xferLog()
          Deprecated. Transfers the log files to the output file in the results directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OracleTool

public OracleTool()
Deprecated. 
Method Detail

configure

public void configure(String tool,
                      List<String> argList,
                      String path,
                      String outDir,
                      String host,
                      String masterhost,
                      CmdAgentImpl cmdAgent,
                      CountDownLatch latch)
Deprecated. 
Configures the Oracle tool.

Specified by:
configure in interface Tool
Parameters:
tool - name of the tool (Executable)
argList - list containing arguments to tool
path - The path to run the tool
outDir - The output directory
host - name of machine the tool is running on
masterhost - name of master machine
cmdAgent - agent The command agent used for executing tools
latch - The latch the tool uses to identify it's completion.

getLogFile

protected String getLogFile()
Deprecated. 
Obtains the temporary log file name.

Returns:
The log file name

getOutputFile

protected String getOutputFile(String outDir,
                               String host)
Deprecated. 
Obtains the final output file name.

Parameters:
outDir - The output or run directory
host - The host name running the tool
Returns:
The output file name

getSnapCommand

protected abstract String getSnapCommand()
Deprecated. 
Creates a sqlplus command to create tool snapshot.

Returns:
The sqlplus command string

parseSnapId

protected String parseSnapId(byte[] output)
Deprecated. 
The parseSnapId method parses the sqlplus stdout and finds the snapshot just taken.

Parameters:
output - The stdout from sqlplus where a snapshot has been taken
Returns:
The snapshot id pertaining to the snapshot just taken.

getReportCommand

protected abstract String getReportCommand(String snapId,
                                           String snapId1,
                                           String outputFile)
Deprecated. 
Creates a sqlplus command to create a tool report.

Parameters:
snapId - The id of the first snap
snapId1 - The id of the second snap
outputFile - The output file
Returns:
The sqlplus command string

kill

public void kill()
Deprecated. 
This method is required by the Tool API. It is called to abort the currently running tool if any.

Specified by:
kill in interface Tool

start

public boolean start(int delay,
                     int duration)
Deprecated. 
This method is responsible for starting up the Oracle tool and stopping it after the duration specified.

Specified by:
start in interface Tool
Parameters:
delay - int delay (sec) after which start should be called
duration - int duration for which the tool needs to be run
Returns:
\true if tool started successfully

start

public boolean start(int delay)
Deprecated. 
This method is responsible for starting up the Oracle tool.

Specified by:
start in interface Tool
Parameters:
delay - int delay (sec) after which start should be called
Returns:
true if tool started successfully

start

protected void start()
Deprecated. 
The Runnable.run() is used to really start the tool after the delay.


stop

public void stop()
Deprecated. 
This method is responsible for stopping the tool.

Specified by:
stop in interface Tool

stop

protected void stop(boolean warn)
Deprecated. 
This method is responsible for stopping the tool utility.

Parameters:
warn - Whether to warn if tool is not running.

xferLog

protected void xferLog()
Deprecated. 
Transfers the log files to the output file in the results directory.


xferFile

protected static void xferFile(String srcFile,
                               String destFile)
Deprecated. 
Transfers the tool output file back to the master.

Parameters:
srcFile - The source file of the tool output
destFile - The transfer destination

finish

protected void finish()
Deprecated. 
Finishes up the Oracle tool.