Package one.microstream.storage.types
Class StorageLockedFile.Default
- java.lang.Object
-
- one.microstream.storage.types.StorageLockedFile.Default
-
- All Implemented Interfaces:
StorageFile,StorageLockedFile
- Direct Known Subclasses:
StorageInventoryFile.Default
- Enclosing interface:
- StorageLockedFile
public static class StorageLockedFile.Default extends Object implements StorageLockedFile
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageLockedFile
StorageLockedFile.Default
-
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description booleanclearUsages(StorageFileUser fileUser)voidclose()booleandelete()booleanexecuteIfUnsued(Consumer<? super StorageLockedFile> action)booleanexists()Pathfile()FileChannelfileChannel()booleanhasUsers()Stringidentifier()Returns a string uniquely identifying the file represented by this instance.Stringname()Return a compact string containing a specific, but not necessarily unique name of the file represented by this instance.Stringqualifier()Returns a string that givesStorageFile.name()a unique identity.booleanregisterUsage(StorageFileUser fileUser)StringtoString()booleantryClose()booleanunregisterUsage(StorageFileUser fileUser)booleanunregisterUsageClosing(StorageFileUser fileUser, Consumer<? super StorageLockedFile> closingAction)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface one.microstream.storage.types.StorageFile
flush, isEmpty, isOpen
-
Methods inherited from interface one.microstream.storage.types.StorageLockedFile
length
-
-
-
-
Method Detail
-
file
public final Path file()
-
fileChannel
public final FileChannel fileChannel()
- Specified by:
fileChannelin interfaceStorageFile
-
qualifier
public String qualifier()
Description copied from interface:StorageFileReturns a string that givesStorageFile.name()a unique identity. Example: The parent directory path of a file.- Specified by:
qualifierin interfaceStorageFile
-
identifier
public String identifier()
Description copied from interface:StorageFileReturns a string uniquely identifying the file represented by this instance.- Specified by:
identifierin interfaceStorageFile- Returns:
- this file's unique identifier.
- See Also:
StorageFile.name()
-
name
public String name()
Description copied from interface:StorageFileReturn a compact string containing a specific, but not necessarily unique name of the file represented by this instance. Might be the same string returned byStorageFile.identifier().- Specified by:
namein interfaceStorageFile- Returns:
- this file's name.
- See Also:
StorageFile.identifier()
-
delete
public boolean delete()
- Specified by:
deletein interfaceStorageFile
-
exists
public boolean exists()
- Specified by:
existsin interfaceStorageFile
-
close
public final void close()
- Specified by:
closein interfaceStorageFile- Specified by:
closein interfaceStorageLockedFile
-
tryClose
public final boolean tryClose()
- Specified by:
tryClosein interfaceStorageLockedFile
-
hasUsers
public final boolean hasUsers()
- Specified by:
hasUsersin interfaceStorageLockedFile
-
executeIfUnsued
public final boolean executeIfUnsued(Consumer<? super StorageLockedFile> action)
- Specified by:
executeIfUnsuedin interfaceStorageLockedFile
-
registerUsage
public final boolean registerUsage(StorageFileUser fileUser)
- Specified by:
registerUsagein interfaceStorageLockedFile
-
clearUsages
public final boolean clearUsages(StorageFileUser fileUser)
- Specified by:
clearUsagesin interfaceStorageLockedFile
-
unregisterUsage
public final boolean unregisterUsage(StorageFileUser fileUser)
- Specified by:
unregisterUsagein interfaceStorageLockedFile
-
unregisterUsageClosing
public boolean unregisterUsageClosing(StorageFileUser fileUser, Consumer<? super StorageLockedFile> closingAction)
- Specified by:
unregisterUsageClosingin interfaceStorageLockedFile
-
-