org.mmtk.utility.options
Class Threads
java.lang.Object
org.vmutil.options.Option
org.vmutil.options.IntOption
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.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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
valueSet
private boolean valueSet
- Has a value been set?
Threads
public Threads()
- Create the option.
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