com.nokia.ant.taskdefs
Class CopyParallelTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.Copy
              extended by com.nokia.ant.taskdefs.CopyParallelTask
All Implemented Interfaces:
java.lang.Cloneable

public class CopyParallelTask
extends org.apache.tools.ant.taskdefs.Copy

Copies a file(s) or directory(s) to a new file(s) or directory(s) using parallel threads. Number of parallel threads can be defined by threadCount. Files are only copied if the source file is newer than the destination file, or when the destination file does not exist. It is possible to explicitly overwrite existing files.

Since:
Helium 0.21

Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.Copy
completeDirMap, destDir, destFile, dirCopyMap, failonerror, file, fileCopyMap, fileUtils, filtering, flatten, forceOverwrite, includeEmpty, mapperElement, preserveLastModified, rcs, verbosity
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
CopyParallelTask()
          CopyParallelTask task constructor.
 
Method Summary
protected  void doFileOperations()
          Actually does the file (and possibly empty directory) copies.
 void execute()
          Perform the copy operation in parallel.
 void setThreadCount(int threadCount)
          Set maximum number of thread.
 
Methods inherited from class org.apache.tools.ant.taskdefs.Copy
add, add, addFileset, buildMap, buildMap, createFilterChain, createFilterSet, createMapper, doResourceOperations, getEncoding, getFileUtils, getFilterChains, getFilterSets, getOutputEncoding, getPreserveLastModified, isEnableMultipleMapping, scan, scan, setEnableMultipleMappings, setEncoding, setFailOnError, setFile, setFiltering, setFlatten, setGranularity, setIncludeEmptyDirs, setOutputEncoding, setOverwrite, setPreserveLastModified, setPreserveLastModified, setTodir, setTofile, setVerbose, supportsNonFileResources, validateAttributes
 
Methods inherited from class org.apache.tools.ant.Task
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 org.apache.tools.ant.ProjectComponent
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

CopyParallelTask

public CopyParallelTask()
CopyParallelTask task constructor.

Method Detail

execute

public final void execute()
Perform the copy operation in parallel.

Overrides:
execute in class org.apache.tools.ant.taskdefs.Copy
Throws:
org.apache.tools.ant.BuildException - if an error occurs.

setThreadCount

public final void setThreadCount(int threadCount)
Set maximum number of thread.

Parameters:
threadCount - maximum number of threads

doFileOperations

protected final void doFileOperations()
Actually does the file (and possibly empty directory) copies. This is a good method for subclasses to override.

Overrides:
doFileOperations in class org.apache.tools.ant.taskdefs.Copy