Package one.microstream.afs.nio.types
Class NioFileWrapper.Abstract<U>
java.lang.Object
one.microstream.afs.types.AItem.Base
one.microstream.afs.types.AFile.Wrapper.Abstract<U>
one.microstream.afs.nio.types.NioFileWrapper.Abstract<U>
- All Implemented Interfaces:
NioFileWrapper
,NioItemWrapper
,AFile
,AFile.Wrapper
,AItem
,AItem.Wrapper
- Direct Known Subclasses:
NioReadableFile.Default
- Enclosing interface:
- NioFileWrapper
public abstract static class NioFileWrapper.Abstract<U> extends AFile.Wrapper.Abstract<U> implements NioFileWrapper
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.afs.types.AFile
AFile.Default, AFile.Observer, AFile.Wrapper
Nested classes/interfaces inherited from interface one.microstream.afs.types.AFile.Wrapper
AFile.Wrapper.Abstract<U>
Nested classes/interfaces inherited from interface one.microstream.afs.types.AItem
AItem.Abstract, AItem.Base, AItem.Wrapper
Nested classes/interfaces inherited from interface one.microstream.afs.nio.types.NioFileWrapper
NioFileWrapper.Abstract<U>
-
Constructor Summary
Constructors Modifier Constructor Description protected
Abstract(AFile actual, U user, Path path, FileChannel fileChannel)
-
Method Summary
Modifier and Type Method Description boolean
checkChannelOpen()
boolean
closeChannel()
FileChannel
ensureOpenChannel()
FileChannel
ensureOpenChannel(OpenOption... options)
protected void
ensurePositionAtFileEnd()
FileChannel
fileChannel()
protected void
internalSetFileChannel(FileChannel fileChannel)
boolean
isChannelOpen()
boolean
isRetired()
protected OpenOption[]
normalizeOpenOptions(OpenOption... options)
boolean
openChannel()
boolean
openChannel(OpenOption... options)
Path
path()
boolean
reopenChannel(OpenOption... options)
boolean
retire()
void
validateIsNotRetired()
protected abstract void
validateOpenOptions(OpenOption... options)
Methods inherited from class one.microstream.afs.types.AFile.Wrapper.Abstract
actual, exists, fileSystem, identifier, iterateObservers, mutex, name, parent, registerObserver, removeObserver, type, user
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface one.microstream.afs.types.AFile
defaultUser, ensureExists, exists, isEmpty, isUsed, iterateObservers, name, registerObserver, removeObserver, size, toPath, toPathString, tryUseReading, tryUseReading, tryUseWriting, tryUseWriting, type, useReading, useReading, useWriting, useWriting
-
Constructor Details
-
Method Details
-
path
- Specified by:
path
in interfaceNioItemWrapper
-
fileChannel
- Specified by:
fileChannel
in interfaceNioFileWrapper
-
retire
public boolean retire()- Specified by:
retire
in interfaceNioFileWrapper
-
isRetired
public boolean isRetired()- Specified by:
isRetired
in interfaceNioFileWrapper
-
validateIsNotRetired
public void validateIsNotRetired() -
closeChannel
- Specified by:
closeChannel
in interfaceNioFileWrapper
- Throws:
IORuntimeException
-
isChannelOpen
public boolean isChannelOpen()- Specified by:
isChannelOpen
in interfaceNioFileWrapper
-
checkChannelOpen
public boolean checkChannelOpen()- Specified by:
checkChannelOpen
in interfaceNioFileWrapper
-
ensureOpenChannel
- Specified by:
ensureOpenChannel
in interfaceNioFileWrapper
-
normalizeOpenOptions
-
validateOpenOptions
-
ensureOpenChannel
- Specified by:
ensureOpenChannel
in interfaceNioFileWrapper
-
openChannel
- Specified by:
openChannel
in interfaceNioFileWrapper
- Throws:
IORuntimeException
-
openChannel
- Specified by:
openChannel
in interfaceNioFileWrapper
- Throws:
IORuntimeException
-
internalSetFileChannel
-
ensurePositionAtFileEnd
- Throws:
IORuntimeException
-
reopenChannel
- Specified by:
reopenChannel
in interfaceNioFileWrapper
- Throws:
IORuntimeException
-