com.sun.grid.jgdi.monitoring
Class TaskSummaryImpl

java.lang.Object
  extended by com.sun.grid.jgdi.monitoring.TaskSummaryImpl
All Implemented Interfaces:
TaskSummary, java.io.Serializable

public class TaskSummaryImpl
extends java.lang.Object
implements TaskSummary, java.io.Serializable

Default implementation of the TaskSummary interface

See Also:
Serialized Form

Constructor Summary
TaskSummaryImpl()
          Creates a new instance of TaskSummary
 
Method Summary
 double getCpuUsage()
          Get the cpu usage of the task.
 int getExitStatus()
          Get the exit status of the task.
 double getIoUsage()
          Get the io usage of the task.
 double getMemUsage()
          Get the mem usage of the task.
 java.lang.String getState()
          Get the state of the task
 java.lang.String getTaskId()
          Get the task id.
 boolean hasCpuUsage()
          Determine if the task has cpu usage
 boolean hasExitStatus()
          Determine if the task has an exit status.
 boolean hasIoUsage()
          Determine if the task has io usage
 boolean hasMemUsage()
          Determine if the task has mem usage
 boolean isRunning()
          Determine if the task is running
 void setCpuUsage(double cpuUsage)
          Set the cpu usage of the task.
 void setExitStatus(int exitStatus)
          Set the exit status of the task
 void setIoUsage(double ioUsage)
          Set the io usage of the task.
 void setMemUsage(double memUsage)
          Set the mem usage of the task.
 void setRunning(boolean isRunning)
          Set the running flag of the task
 void setState(java.lang.String state)
          Set the state of the task
 void setTaskId(java.lang.String taskId)
          Set the task id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskSummaryImpl

public TaskSummaryImpl()
Creates a new instance of TaskSummary

Method Detail

getTaskId

public java.lang.String getTaskId()
Get the task id.

Specified by:
getTaskId in interface TaskSummary
Returns:
the task id

setTaskId

public void setTaskId(java.lang.String taskId)
Set the task id

Parameters:
taskId - the task id

getState

public java.lang.String getState()
Get the state of the task

Specified by:
getState in interface TaskSummary
Returns:
state of the task

setState

public void setState(java.lang.String state)
Set the state of the task

Parameters:
state - state of the task

hasCpuUsage

public boolean hasCpuUsage()
Determine if the task has cpu usage

Specified by:
hasCpuUsage in interface TaskSummary
Returns:
true if the task has cpu usage

getCpuUsage

public double getCpuUsage()
Get the cpu usage of the task. Returns only a meanful value if hasCpuUsage returns true.

Specified by:
getCpuUsage in interface TaskSummary
Returns:
the cpu usage of the task

setCpuUsage

public void setCpuUsage(double cpuUsage)
Set the cpu usage of the task.

Parameters:
cpuUsage - the cpu usage

hasMemUsage

public boolean hasMemUsage()
Determine if the task has mem usage

Specified by:
hasMemUsage in interface TaskSummary
Returns:
true if the task has mem usage

getMemUsage

public double getMemUsage()
Get the mem usage of the task. Returns only a meanful value if hasMemUsage returns true.

Specified by:
getMemUsage in interface TaskSummary
Returns:
the mem usage of the task

setMemUsage

public void setMemUsage(double memUsage)
Set the mem usage of the task.

Parameters:
memUsage - the mem usage

hasIoUsage

public boolean hasIoUsage()
Determine if the task has io usage

Specified by:
hasIoUsage in interface TaskSummary
Returns:
true if the task has io usage

getIoUsage

public double getIoUsage()
Get the io usage of the task. Returns only a meanful value if hasIoUsage returns true.

Specified by:
getIoUsage in interface TaskSummary
Returns:
the io usage of the task

setIoUsage

public void setIoUsage(double ioUsage)
Set the io usage of the task.

Parameters:
ioUsage - the io usage

isRunning

public boolean isRunning()
Determine if the task is running

Specified by:
isRunning in interface TaskSummary
Returns:
true if task is running

setRunning

public void setRunning(boolean isRunning)
Set the running flag of the task

Parameters:
isRunning - the running flag

hasExitStatus

public boolean hasExitStatus()
Determine if the task has an exit status.

Specified by:
hasExitStatus in interface TaskSummary
Returns:
true if the task has an exit status

getExitStatus

public int getExitStatus()
Get the exit status of the task. Returns only a meanful value if hasExitStatus returns true.

Specified by:
getExitStatus in interface TaskSummary
Returns:
the exit status of the task

setExitStatus

public void setExitStatus(int exitStatus)
Set the exit status of the task

Parameters:
exitStatus - the exit status


Copyright © 2007 Sun Microsystems, Inc. All rights reserved.