Package one.microstream.afs.types
Class AccessManager.Default<S extends AFileSystem>
java.lang.Object
one.microstream.afs.types.AccessManager.Default<S>
- All Implemented Interfaces:
AccessManager
- Enclosing interface:
- AccessManager
public static class AccessManager.Default<S extends AFileSystem> extends Object implements AccessManager
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.afs.types.AccessManager
AccessManager.Creator, AccessManager.Default<S extends AFileSystem>
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected void
decrementDirectoryUsageCount(ADirectory directory)
AReadableFile
downgrade(AWritableFile file)
<R> R
executeMutating(ADirectory directory, Function<? super ADirectory,R> logic)
S
fileSystem()
protected one.microstream.afs.types.AccessManager.Default.DirEntry
getNonNullDirEntry(ADirectory directory)
protected void
incrementDirectoryUsageCount(ADirectory directory)
protected boolean
internalUnregister(AReadableFile file)
protected boolean
internalUnregister(AReadableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry)
protected AReadableFile
internalUseReading(AFile file, Object user, one.microstream.afs.types.AccessManager.Default.ConflictHandler conflictHandler)
protected AWritableFile
internalUseWriting(AFile file, Object user, one.microstream.afs.types.AccessManager.Default.ConflictHandler conflictHandler)
boolean
isMutating(ADirectory directory)
boolean
isUsed(ADirectory directory)
boolean
isUsed(AFile file)
boolean
isUsedReading(AFile file)
boolean
isUsedReading(AFile file, Object user)
boolean
isUsedWriting(AFile file)
boolean
isUsedWriting(AFile file, Object user)
protected Object
mutex()
protected void
removeExclusive(AWritableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry)
protected static void
throwUnregisteredException(AReadableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry)
AReadableFile
tryUseReading(AFile file, Object user)
AWritableFile
tryUseWriting(AFile file, Object user)
boolean
unregister(AReadableFile file)
boolean
unregister(AWritableFile file)
protected void
unregisterExclusive(AWritableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry)
protected void
unregisterShared(AReadableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry)
AReadableFile
useReading(AFile file, Object user)
AWritableFile
useWriting(AFile file, Object user)
protected void
validateExclusive(AWritableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.afs.types.AccessManager
defaultUser, tryUseReading, tryUseWriting, useReading, useWriting
-
Constructor Details
-
Method Details
-
mutex
-
fileSystem
- Specified by:
fileSystem
in interfaceAccessManager
-
isUsed
- Specified by:
isUsed
in interfaceAccessManager
-
isMutating
- Specified by:
isMutating
in interfaceAccessManager
-
isUsed
- Specified by:
isUsed
in interfaceAccessManager
-
isUsedReading
- Specified by:
isUsedReading
in interfaceAccessManager
-
isUsedWriting
- Specified by:
isUsedWriting
in interfaceAccessManager
-
isUsedReading
- Specified by:
isUsedReading
in interfaceAccessManager
-
isUsedWriting
- Specified by:
isUsedWriting
in interfaceAccessManager
-
executeMutating
- Specified by:
executeMutating
in interfaceAccessManager
-
useReading
- Specified by:
useReading
in interfaceAccessManager
-
tryUseReading
- Specified by:
tryUseReading
in interfaceAccessManager
-
useWriting
- Specified by:
useWriting
in interfaceAccessManager
-
tryUseWriting
- Specified by:
tryUseWriting
in interfaceAccessManager
-
incrementDirectoryUsageCount
-
downgrade
- Specified by:
downgrade
in interfaceAccessManager
-
internalUseReading
protected final AReadableFile internalUseReading(AFile file, Object user, one.microstream.afs.types.AccessManager.Default.ConflictHandler conflictHandler) -
internalUseWriting
protected final AWritableFile internalUseWriting(AFile file, Object user, one.microstream.afs.types.AccessManager.Default.ConflictHandler conflictHandler) -
unregister
- Specified by:
unregister
in interfaceAccessManager
-
unregister
- Specified by:
unregister
in interfaceAccessManager
-
internalUnregister
-
decrementDirectoryUsageCount
-
getNonNullDirEntry
protected final one.microstream.afs.types.AccessManager.Default.DirEntry getNonNullDirEntry(ADirectory directory) -
internalUnregister
protected boolean internalUnregister(AReadableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry) -
unregisterShared
protected void unregisterShared(AReadableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry) -
unregisterExclusive
protected void unregisterExclusive(AWritableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry) -
validateExclusive
protected void validateExclusive(AWritableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry) -
throwUnregisteredException
protected static void throwUnregisteredException(AReadableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry) -
removeExclusive
protected void removeExclusive(AWritableFile file, one.microstream.afs.types.AccessManager.Default.FileEntry entry)
-