|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.tesla.aether.concurrency.LockingFileProcessor
@Component(role=org.sonatype.aether.spi.io.FileProcessor.class,
hint="default")
public class LockingFileProcessorA utility class helping with file-based operations.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.sonatype.aether.spi.io.FileProcessor |
|---|
org.sonatype.aether.spi.io.FileProcessor.ProgressListener |
| Constructor Summary | |
|---|---|
LockingFileProcessor()
|
|
LockingFileProcessor(FileLockManager fileLockManager)
|
|
| Method Summary | |
|---|---|
long |
copy(File source,
File target,
org.sonatype.aether.spi.io.FileProcessor.ProgressListener listener)
Copy src- to target-file. |
void |
initService(org.sonatype.aether.spi.locator.ServiceLocator locator)
|
boolean |
mkdirs(File directory)
Thread-safe variant of File.mkdirs(). |
void |
move(File source,
File target)
|
void |
setFileLockManager(FileLockManager lockManager)
Sets the LockManager to use. |
LockingFileProcessor |
setLogger(org.sonatype.aether.spi.log.Logger logger)
Sets the logger to use for this component. |
void |
write(File file,
String data)
Write the given data to a file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LockingFileProcessor()
public LockingFileProcessor(FileLockManager fileLockManager)
| Method Detail |
|---|
public LockingFileProcessor setLogger(org.sonatype.aether.spi.log.Logger logger)
logger - The logger to use, may be null to disable logging.
null.public void setFileLockManager(FileLockManager lockManager)
lockManager - The LockManager to use, may not be null.public void initService(org.sonatype.aether.spi.locator.ServiceLocator locator)
initService in interface org.sonatype.aether.spi.locator.Servicepublic boolean mkdirs(File directory)
File.mkdirs(). Adapted from Java 6.
mkdirs in interface org.sonatype.aether.spi.io.FileProcessor
public long copy(File source,
File target,
org.sonatype.aether.spi.io.FileProcessor.ProgressListener listener)
throws IOException
This method performs R/W-locking on the given files to provide concurrent access to files without data
corruption, and will honor FileLocks from an external process.
copy in interface org.sonatype.aether.spi.io.FileProcessorsource - the file to copy from, must not be null.target - the file to copy to, must not be null.listener - the listener to notify about the copy progress, may be null.
IOException - if an I/O error occurs.
public void write(File file,
String data)
throws IOException
write in interface org.sonatype.aether.spi.io.FileProcessorfile - The file to write to, must not be null. This file will be truncated.data - The data to write, may be null.
IOException - if an I/O error occurs.
public void move(File source,
File target)
throws IOException
move in interface org.sonatype.aether.spi.io.FileProcessorIOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||