public abstract class AbstractExternalFileSystem extends AbstractFileSystem implements ExternalFileSystem
| Constructor and Description |
|---|
AbstractExternalFileSystem(String baseUri) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
acquireLock(PathLock path)
Attempts to lock the given
lock and throws FileLockedException if already locked |
protected void |
acquireLock(UriLock lock)
Attempts to lock the given
lock and throws FileLockedException if already locked |
protected PathLock |
createLock(Path path) |
protected abstract UriLock |
createLock(URI uri) |
protected boolean |
isLocked(Path path)
Try to acquire a lock on a file and release it immediately.
|
protected boolean |
isLocked(URI uri)
Try to acquire a lock on a file and release it immediately.
|
PathLock |
lock(Path path)
Acquires and returns lock over the given
path. |
UriLock |
lock(URI uri)
Acquires and returns lock over the given
uri. |
void |
verifyNotLocked(Path path)
Verify that the given
path is not locked |
void |
verifyNotLocked(URI uri)
Verify that the given
uri is not locked |
copy, createDirectory, createMuleLock, delete, getBasePath, getCopyCommand, getCreateDirectoryCommand, getDeleteCommand, getFileMessageMediaType, getListCommand, getMoveCommand, getReadCommand, getRenameCommand, getWriteCommand, list, list, move, read, read, rename, write, writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchangeToBaseDir, copy, createDirectory, createMuleLock, delete, getBasePath, getFileMessageMediaType, list, list, move, read, read, rename, write, writepublic AbstractExternalFileSystem(String baseUri)
public final UriLock lock(URI uri)
uri.
Depending on the underlying filesystem, the extent of the lock will depend on the implementation. If a lock can not be
acquired, then an IllegalStateException is thrown.
Whoever request the lock MUST release it as soon as possible.
lock in interface ExternalFileSystemuri - the uri to the file you want to lockUriLockIllegalArgumentException - if a lock could not be acquiredprotected void acquireLock(UriLock lock)
lock and throws FileLockedException if already lockedlock - the UriLock to be acquiredFileLockedException - if the lock is already acquiredprotected boolean isLocked(URI uri)
public void verifyNotLocked(URI uri)
uri is not lockedverifyNotLocked in interface ExternalFileSystemuri - the uri to testIllegalStateException - if the uri is indeed lockedprotected abstract UriLock createLock(URI uri)
uri - of the file to lock.UriLock on the given uri.public PathLock lock(Path path)
AbstractFileSystempath.
Depending on the underlying filesystem, the extent of the lock will depend on the implementation. If a lock can not be
acquired, then an IllegalStateException is thrown.
Whoever request the lock MUST release it as soon as possible.
lock in interface FileSystemlock in class AbstractFileSystempath - the path to the file you want to lockPathLockpublic final void verifyNotLocked(Path path)
AbstractFileSystempath is not lockedverifyNotLocked in interface FileSystemverifyNotLocked in class AbstractFileSystempath - the path to testprotected final boolean isLocked(Path path)
AbstractFileSystemisLocked in class AbstractFileSystemprotected final void acquireLock(PathLock path)
AbstractFileSystemlock and throws FileLockedException if already lockedacquireLock in class AbstractFileSystempath - the PathLock to be acquiredprotected final PathLock createLock(Path path)
createLock in class AbstractFileSystemCopyright © 2003–2019 MuleSoft, Inc.. All rights reserved.