Package one.microstream.storage.types
Interface StorageLockedFile
- All Superinterfaces:
StorageFile
- All Known Subinterfaces:
StorageChannelImportSourceFile
,StorageDataFile<I>
,StorageInventoryFile
- All Known Implementing Classes:
StorageDataFile.Default
,StorageInventoryFile.Default
,StorageLockedFile.Default
,StorageRequestTaskImportData.SourceFileSlice
public interface StorageLockedFile extends StorageFile
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StorageLockedFile.Default
-
Method Summary
Modifier and Type Method Description boolean
clearUsages(StorageFileUser fileUser)
void
close()
boolean
executeIfUnsued(Consumer<? super StorageLockedFile> action)
boolean
hasUsers()
default long
length()
static StorageLockedFile
New(Path file, FileLock lock)
static StorageLockedFile
openLockedFile(Path file)
static FileLock
openLockedFileChannel(Path file)
boolean
registerUsage(StorageFileUser fileUser)
boolean
tryClose()
boolean
unregisterUsage(StorageFileUser fileUser)
boolean
unregisterUsageClosing(StorageFileUser fileUser, Consumer<? super StorageLockedFile> closingAction)
Methods inherited from interface one.microstream.storage.types.StorageFile
delete, exists, fileChannel, flush, identifier, isEmpty, isOpen, name, qualifier
-
Method Details
-
length
default long length()- Specified by:
length
in interfaceStorageFile
-
hasUsers
boolean hasUsers() -
executeIfUnsued
-
registerUsage
-
clearUsages
-
unregisterUsage
-
unregisterUsageClosing
boolean unregisterUsageClosing(StorageFileUser fileUser, Consumer<? super StorageLockedFile> closingAction) -
close
void close()- Specified by:
close
in interfaceStorageFile
-
tryClose
boolean tryClose() -
openLockedFileChannel
-
openLockedFile
-
New
-