Methods Summary |
---|
public boolean | allRunning()
if (isEmpty()) {
return false;
} else {
return numRunning() == size() ? true : false;
}
|
public boolean | anyRunning()
return numRunning() > 0 ? true : false;
|
public RuntimeStatus | getStatus(int index)Return the RuntimeStatus at the specified index
return (RuntimeStatus)super.get(index);
|
public boolean | isEmpty()
return size() == 0 ? true : false;
|
public int | numNeedingRestart()
int count = 0;
for (int i = 0; i < size(); i++) {
//Only running instances are considered for restart required
if (((RuntimeStatus)get(i)).isRunning() &&
((RuntimeStatus)get(i)).isRestartNeeded())
{
count++;
}
}
return count;
|
public int | numRunning()
int count = 0;
for (int i = 0; i < size(); i++) {
if (((RuntimeStatus)get(i)).isRunning()) {
count++;
}
}
return count;
|
public int | numStopped()
return size() - numRunning();
|
public java.lang.String | toString()
if (allRunning()) {
return Status.getStatusString(Status.kInstanceRunningCode);
} else if (anyRunning()) {
return Status.getStatusString(Status.kClusterPartiallyRunningCode);
} else {
return Status.getStatusString(Status.kInstanceNotRunningCode);
}
|