public class WindowsPlatform extends Platform
| Constructor and Description |
|---|
WindowsPlatform() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
bgexecInternal(String[] cmdarray,
String workdir,
String logfile)
Starts a background command writing its stdout and stderr to
the specified log file.
|
protected void |
dumpHeap(int pid,
String userDir,
String options)
Tells a process to dump heap
|
protected boolean |
exists(int pid)
Answers whether a Java process exists with the given PID.
|
protected String |
getCommentPrefix()
Returns the comment prefix for shell scripts.
|
protected String[] |
getDumpHeapCommand(int pid,
String userDir,
String options) |
protected String |
getDumpLocksCommand(int pid) |
protected String |
getFileExtension()
Returns the file extension for shell scripts.
|
protected String |
getKillCommand(int pid) |
protected String |
getMemoryStatus(int maxWaitSec)
Returns the memory status.
|
protected String |
getNetcontrolCommand(String target,
int op) |
protected String |
getNetworkStatistics(int maxWaitSec)
Returns network statistics.
|
protected String |
getPrintStacksCommand(int pid) |
protected String |
getProcessStatus(int maxWaitSec)
Returns the process status.
|
protected String |
getScriptHeader()
Returns the header for shell scripts.
|
protected String |
getShutdownCommand(int pid) |
protected void |
kill(int pid)
Kills a process.
|
protected void |
printStacks(int pid)
Tells a process to print its stacks to its standard output
|
protected void |
restartNTP()
Uses NTP to synchronize the local clock with the network time server.
|
protected void |
setExecutePermission(String fn)
Gives user execute permission to the file.
|
protected void |
setReadPermission(String dir)
Gives universal read permission to all files in the directory.
|
protected void |
shutdown(int pid) |
protected int bgexecInternal(String[] cmdarray, String workdir, String logfile) throws IOException
bgexecInternal in class Platformcmdarray - An array of strings that specify the command to run.
The first element must be the executable.
Each additional command line argument should have its own entry
in the array.workdir - the current directory of the created processlogfile - the file the created process will write
stdout and stderr to.IOException - if a child process could not be created.protected boolean exists(int pid)
protected void shutdown(int pid)
protected void kill(int pid)
Platformprotected void printStacks(int pid)
PlatformprintStacks in class Platformpid - the id of the process that will print its stacksprotected void dumpHeap(int pid,
String userDir,
String options)
Platformprotected String getNetworkStatistics(int maxWaitSec)
PlatformgetNetworkStatistics in class Platformprotected String getShutdownCommand(int pid)
getShutdownCommand in class Platformprotected String getKillCommand(int pid)
getKillCommand in class Platformprotected String getDumpLocksCommand(int pid)
getDumpLocksCommand in class Platformprotected String getPrintStacksCommand(int pid)
getPrintStacksCommand in class Platformprotected String[] getDumpHeapCommand(int pid, String userDir, String options)
getDumpHeapCommand in class Platformprotected String getNetcontrolCommand(String target, int op)
getNetcontrolCommand in class Platformprotected void restartNTP()
PlatformrestartNTP in class Platformprotected String getFileExtension()
PlatformgetFileExtension in class Platformprotected String getScriptHeader()
PlatformgetScriptHeader in class Platformprotected String getCommentPrefix()
PlatformgetCommentPrefix in class Platformprotected void setExecutePermission(String fn)
PlatformsetExecutePermission in class Platformprotected void setReadPermission(String dir)
PlatformsetReadPermission in class Platformprotected String getProcessStatus(int maxWaitSec)
PlatformgetProcessStatus in class Platformprotected String getMemoryStatus(int maxWaitSec)
PlatformgetMemoryStatus in class PlatformCopyright © 2010-2015 Pivotal Software, Inc. All rights reserved.