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 Detail
-
length
default long length()
- Specified by:
length
in interfaceStorageFile
-
hasUsers
boolean hasUsers()
-
executeIfUnsued
boolean executeIfUnsued(Consumer<? super StorageLockedFile> action)
-
registerUsage
boolean registerUsage(StorageFileUser fileUser)
-
clearUsages
boolean clearUsages(StorageFileUser fileUser)
-
unregisterUsage
boolean unregisterUsage(StorageFileUser fileUser)
-
unregisterUsageClosing
boolean unregisterUsageClosing(StorageFileUser fileUser, Consumer<? super StorageLockedFile> closingAction)
-
close
void close()
- Specified by:
close
in interfaceStorageFile
-
tryClose
boolean tryClose()
-
openLockedFile
static StorageLockedFile openLockedFile(Path file)
-
New
static StorageLockedFile New(Path file, FileLock lock)
-
-