Class Nice

  extended by
      extended by
          extended by
All Implemented Interfaces:

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 currentPriority to 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
target, taskName, taskType, wrapper
Fields inherited from class
description, location, project
Constructor Summary
Method Summary
 void execute()
          Execute the task
 void setCurrentPriority(java.lang.String currentPriority)
          The name of a property to set to the value of the current thread priority.
 void setNewPriority(int newPriority)
          the new priority, in the range 1-10.
Methods inherited from class
bindToOwner, 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
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Nice()
Method Detail


public void execute()
             throws BuildException
Execute the task

execute in class Task
BuildException - if something goes wrong with the build


public void setCurrentPriority(java.lang.String currentPriority)
The name of a property to set to the value of the current thread priority. Optional

currentPriority - the property name.


public void setNewPriority(int newPriority)
the new priority, in the range 1-10.

newPriority - the new priority value.