Top Description Fields Constructors Methods
org.apache.tools.ant.taskdefs

public Class Nice

extends Task
Class Inheritance
Imports
org.apache.tools.ant.BuildException, .Project, .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

Modifier and TypeField and Description
private String
currentPriority

the current priority

private Integer
newPriority

the new priority

Inherited from org.apache.tools.ant.Task:
targettaskNametaskTypewrapper

Constructor Summary

AccessConstructor and Description
public
Nice()

Method Summary

Modifier and TypeMethod and Description
public void
execute()

Overrides org.apache.tools.ant.Task.execute.

Execute the task
public void
setCurrentPriority(String
the property name.
currentPriority
)

The name of a property to set to the value of the current thread priority.

public void
setNewPriority(int
the new priority value.
newPriority
)

the new priority, in the range 1-10.

Inherited from org.apache.tools.ant.Task:
bindToOwnergetOwningTargetgetRuntimeConfigurableWrappergetTaskNamegetTaskTypegetWrapperhandleErrorFlushhandleErrorOutputhandleFlushhandleInputhandleOutputinitisInvalidloglogloglogmaybeConfigureperformreconfiguresetOwningTargetsetRuntimeConfigurableWrappersetTaskNamesetTaskType

Field Detail

currentPriorityback to summary
private String currentPriority

the current priority

newPriorityback to summary
private Integer newPriority

the new priority

Constructor Detail

Niceback to summary
public Nice()

Method Detail

executeback to summary
public void execute() throws BuildException

Overrides org.apache.tools.ant.Task.execute.

Execute the task

Annotations
@Override
Exceptions
BuildException:
if something goes wrong with the build
setCurrentPriorityback to summary
public void setCurrentPriority(String currentPriority)

The name of a property to set to the value of the current thread priority. Optional

Parameters
currentPriority:String

the property name.

setNewPriorityback to summary
public void setNewPriority(int newPriority)

the new priority, in the range 1-10.

Parameters
newPriority:int

the new priority value.