public class FileBasedLock extends Object implements UploadLock
| Constructor and Description |
|---|
FileBasedLock(String uploadUri,
Path lockPath) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected FileChannel |
createFileChannel() |
String |
getUploadUri()
Get the upload URI of the upload that is locked by this lock
|
void |
release()
Method to release the lock on an upload when done processing it.
|
protected Path lockPath
public FileBasedLock(String uploadUri, Path lockPath) throws UploadAlreadyLockedException, IOException
public String getUploadUri()
UploadLockgetUploadUri in interface UploadLockpublic void release()
UploadLockrelease in interface UploadLockpublic void close()
throws IOException
close in interface AutoCloseableclose in interface UploadLockIOExceptionprotected FileChannel createFileChannel() throws IOException
IOExceptionCopyright © 2019. All rights reserved.