Package org.apache.tools.ant.taskdefs
Class Nice
- java.lang.Object
- 
- org.apache.tools.ant.ProjectComponent
- 
- org.apache.tools.ant.Task
- 
- org.apache.tools.ant.taskdefs.Nice
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 
 public class Nice extends Task A task to provide "nice-ness" to the current thread, and/or to query the current value. Examples:<nice currentPriority="current.value" > Set currentPriorityto the current priority<nice newPriority="10" > Raise the priority of the build process (But not forked programs) <nice currentPriority="old" newPriority="3" > Lower the priority of the build process (But not forked programs), and save the old value to the property old.
- 
- 
Field Summary- 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description Nice()
 - 
Method SummaryModifier and Type Method Description voidexecute()Execute the taskvoidsetCurrentPriority(java.lang.String currentPriority)The name of a property to set to the value of the current thread priority.voidsetNewPriority(int newPriority)the new priority, in the range 1-10.- 
Methods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
- 
 
- 
- 
- 
Method Detail- 
executepublic void execute() throws BuildExceptionExecute the task- Overrides:
- executein class- Task
- Throws:
- BuildException- if something goes wrong with the build
 
 - 
setCurrentPrioritypublic void setCurrentPriority(java.lang.String currentPriority) The name of a property to set to the value of the current thread priority. Optional- Parameters:
- currentPriority- the property name.
 
 - 
setNewPrioritypublic void setNewPriority(int newPriority) the new priority, in the range 1-10.- Parameters:
- newPriority- the new priority value.
 
 
- 
 
-