org.mmtk.utility.options
Class Threads

java.lang.Object
  extended by org.vmutil.options.Option
      extended by org.vmutil.options.IntOption
          extended by org.mmtk.utility.options.Threads

public final class Threads
extends IntOption

The number of GC threads to use for parallel collection. This is slightly unclean as the default value is not known at build time.


Field Summary
private  boolean valueSet
          Has a value been set?
 
Fields inherited from class org.vmutil.options.IntOption
defaultValue, value
 
Fields inherited from class org.vmutil.options.Option
ADDRESS_OPTION, BOOLEAN_OPTION, ENUM_OPTION, FLOAT_OPTION, INT_OPTION, MICROSECONDS_OPTION, PAGES_OPTION, RAW, READABLE, set, STRING_OPTION, XML
 
Constructor Summary
Threads()
          Create the option.
 
Method Summary
 void setValue(int value)
          Return the number of threads to use, or delegate to the runtime if this has not been set.
 void updateDefaultValue(int defaultValue)
          Update the default value, only overriding value if no explicit value was set.
protected  void validate()
          Only accept values of 1 or higher.
 
Methods inherited from class org.vmutil.options.IntOption
getDefaultValue, getValue, setDefaultValue
 
Methods inherited from class org.vmutil.options.Option
fail, failIf, getDescription, getKey, getName, getNext, getType, warn, warnIf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

valueSet

private boolean valueSet
Has a value been set?

Constructor Detail

Threads

public Threads()
Create the option.

Method Detail

updateDefaultValue

public void updateDefaultValue(int defaultValue)
Update the default value, only overriding value if no explicit value was set.

Parameters:
defaultValue - The actual default value.

setValue

public void setValue(int value)
Return the number of threads to use, or delegate to the runtime if this has not been set.

Overrides:
setValue in class IntOption
Parameters:
value - The new value for the option.

validate

protected void validate()
Only accept values of 1 or higher.

Overrides:
validate in class Option