Package one.microstream.afs.types
Class AIoHandler.Abstract<FS,DS,I extends AItem,F extends AFile,D extends ADirectory,R extends AReadableFile,W extends AWritableFile>
java.lang.Object
one.microstream.afs.types.AIoHandler.Abstract<FS,DS,I,F,D,R,W>
- All Implemented Interfaces:
AIoHandler
,WriteController
- Direct Known Subclasses:
NioIoHandler.Default
,SqlIoHandler.Default
- Enclosing interface:
- AIoHandler
public abstract static class AIoHandler.Abstract<FS,DS,I extends AItem,F extends AFile,D extends ADirectory,R extends AReadableFile,W extends AWritableFile> extends Object implements AIoHandler
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.afs.types.AIoHandler
AIoHandler.Abstract<FS,DS,I extends AItem,F extends AFile,D extends ADirectory,R extends AReadableFile,W extends AWritableFile>
Nested classes/interfaces inherited from interface one.microstream.afs.types.WriteController
WriteController.Disabled, WriteController.Enabled
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description protected R
castReadableFile(AReadableFile file)
protected W
castWritableFile(AWritableFile file)
boolean
close(AReadableFile file)
long
copyFrom(AReadableFile source, long sourcePosition, long length, AWritableFile targetSubject)
long
copyFrom(AReadableFile source, long sourcePosition, AWritableFile targetSubject)
long
copyFrom(AReadableFile source, AWritableFile targetSubject)
protected long
copyGeneric(AReadableFile source, long sourcePosition, AWritableFile target)
protected long
copyGeneric(AReadableFile source, long sourcePosition, AWritableFile target, long length)
protected long
copyGeneric(AReadableFile source, AWritableFile target)
long
copyTo(AReadableFile sourceSubject, long sourcePosition, long length, AWritableFile target)
long
copyTo(AReadableFile sourceSubject, long sourcePosition, AWritableFile target)
long
copyTo(AReadableFile sourceSubject, AWritableFile target)
void
create(ADirectory directory)
void
create(AWritableFile file)
protected RuntimeException
createUnhandledTypeException(Object subject, Class<?> checkedType)
protected RuntimeException
createUnhandledTypeException(Object subject, Class<?> checkedType, int cutStackTrace)
protected RuntimeException
createUnhandledTypeExceptionDirectory(Object subject)
protected RuntimeException
createUnhandledTypeExceptionFile(Object subject)
protected RuntimeException
createUnhandledTypeExceptionItem(Object subject)
protected RuntimeException
createUnhandledTypeExceptionReadableFile(Object subject)
protected RuntimeException
createUnhandledTypeExceptionWritableFile(Object subject)
boolean
deleteFile(AWritableFile file)
boolean
ensureExists(ADirectory directory)
boolean
ensureExists(AWritableFile file)
boolean
exists(ADirectory directory)
boolean
exists(AFile file)
void
inventorize(ADirectory directory)
boolean
isHandledDirectory(ADirectory directory)
boolean
isHandledFile(AFile file)
boolean
isHandledItem(AItem item)
boolean
isHandledReadableFile(AReadableFile file)
boolean
isHandledWritableFile(AWritableFile file)
boolean
isOpen(AReadableFile file)
boolean
isWritable()
XGettingEnum<String>
listDirectories(ADirectory parent)
XGettingEnum<String>
listFiles(ADirectory parent)
XGettingEnum<String>
listItems(ADirectory parent)
void
moveFile(AWritableFile sourceFile, AWritableFile targetFile)
boolean
openReading(AReadableFile file)
boolean
openWriting(AWritableFile file)
ByteBuffer
readBytes(AReadableFile sourceFile)
ByteBuffer
readBytes(AReadableFile sourceFile, long position)
ByteBuffer
readBytes(AReadableFile sourceFile, long position, long length)
long
readBytes(AReadableFile sourceFile, ByteBuffer targetBuffer)
long
readBytes(AReadableFile sourceFile, ByteBuffer targetBuffer, long position)
long
readBytes(AReadableFile sourceFile, ByteBuffer targetBuffer, long position, long length)
long
readBytes(AReadableFile sourceFile, BufferProvider bufferProvider)
long
readBytes(AReadableFile sourceFile, BufferProvider bufferProvider, long position)
long
readBytes(AReadableFile sourceFile, BufferProvider bufferProvider, long position, long length)
long
size(AFile file)
protected abstract boolean
specificClose(R file)
protected abstract long
specificCopyFrom(AReadableFile source, long sourcePosition, long length, W targetSubject)
protected abstract long
specificCopyFrom(AReadableFile source, long sourcePosition, W targetSubject)
protected abstract long
specificCopyFrom(AReadableFile source, W targetSubject)
protected abstract long
specificCopyTo(R sourceSubject, long sourcePosition, long length, AWritableFile target)
protected abstract long
specificCopyTo(R sourceSubject, long sourcePosition, AWritableFile target)
protected abstract long
specificCopyTo(R sourceSubject, AWritableFile target)
protected abstract void
specificCreate(D file)
protected abstract void
specificCreate(W file)
protected abstract boolean
specificDeleteFile(W file)
protected abstract boolean
specificExists(D directory)
protected abstract boolean
specificExists(F file)
protected abstract void
specificInventorize(D directory)
protected abstract boolean
specificIsOpen(R file)
protected abstract XGettingEnum<String>
specificListDirectories(D parent)
protected abstract XGettingEnum<String>
specificListFiles(D parent)
protected abstract XGettingEnum<String>
specificListItems(D parent)
protected abstract void
specificMoveFile(W sourceFile, AWritableFile targetFile)
protected abstract boolean
specificOpenReading(R file)
protected abstract boolean
specificOpenWriting(W file)
protected abstract ByteBuffer
specificReadBytes(R sourceFile)
protected abstract ByteBuffer
specificReadBytes(R sourceFile, long position)
protected abstract ByteBuffer
specificReadBytes(R sourceFile, long position, long length)
protected abstract long
specificReadBytes(R sourceFile, ByteBuffer targetBuffer)
protected abstract long
specificReadBytes(R sourceFile, ByteBuffer targetBuffer, long position)
protected abstract long
specificReadBytes(R sourceFile, ByteBuffer targetBuffer, long position, long length)
protected abstract long
specificReadBytes(R sourceFile, BufferProvider bufferProvider)
protected abstract long
specificReadBytes(R sourceFile, BufferProvider bufferProvider, long position)
protected abstract long
specificReadBytes(R sourceFile, BufferProvider bufferProvider, long position, long length)
protected abstract long
specificSize(F file)
protected abstract void
specificTruncateFile(W file, long newSize)
protected abstract long
specificWriteBytes(W targetFile, Iterable<? extends ByteBuffer> sourceBuffers)
protected abstract boolean
subjectDirectoryExists(DS directory)
protected abstract boolean
subjectFileExists(FS file)
protected abstract long
subjectFileSize(FS file)
protected abstract DS
toSubjectDirectory(ADirectory directory)
protected abstract FS
toSubjectFile(AFile file)
void
truncate(AWritableFile file, long newSize)
void
validateHandledDirectory(ADirectory directory)
void
validateHandledFile(AFile file)
void
validateHandledReadableFile(AReadableFile file)
void
validateHandledWritableFile(AWritableFile file)
void
validateIsWritable()
long
writeBytes(AWritableFile targetFile, Iterable<? extends ByteBuffer> sourceBuffers)
-
Constructor Details
-
Method Details
-
validateIsWritable
public final void validateIsWritable()- Specified by:
validateIsWritable
in interfaceWriteController
-
isWritable
public final boolean isWritable()- Specified by:
isWritable
in interfaceWriteController
-
specificSize
-
specificExists
-
specificExists
-
specificListItems
-
specificListDirectories
-
specificListFiles
-
specificInventorize
-
specificIsOpen
-
specificOpenReading
-
specificOpenWriting
-
specificClose
-
specificCreate
-
specificCreate
-
specificReadBytes
-
specificReadBytes
-
specificReadBytes
-
specificReadBytes
-
specificReadBytes
-
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, ByteBuffer targetBuffer, long position, long length) -
specificReadBytes
-
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, BufferProvider bufferProvider, long position) -
specificReadBytes
protected abstract long specificReadBytes(R sourceFile, BufferProvider bufferProvider, long position, long length) -
specificCopyTo
-
specificCopyTo
-
specificCopyTo
protected abstract long specificCopyTo(R sourceSubject, long sourcePosition, long length, AWritableFile target) -
specificCopyFrom
-
specificCopyFrom
protected abstract long specificCopyFrom(AReadableFile source, long sourcePosition, W targetSubject) -
specificCopyFrom
protected abstract long specificCopyFrom(AReadableFile source, long sourcePosition, long length, W targetSubject) -
specificWriteBytes
protected abstract long specificWriteBytes(W targetFile, Iterable<? extends ByteBuffer> sourceBuffers) -
specificMoveFile
-
specificDeleteFile
-
specificTruncateFile
-
copyGeneric
-
copyGeneric
-
copyGeneric
protected long copyGeneric(AReadableFile source, long sourcePosition, AWritableFile target, long length) -
createUnhandledTypeException
-
createUnhandledTypeException
protected RuntimeException createUnhandledTypeException(Object subject, Class<?> checkedType, int cutStackTrace) -
createUnhandledTypeExceptionItem
-
createUnhandledTypeExceptionFile
-
createUnhandledTypeExceptionDirectory
-
createUnhandledTypeExceptionReadableFile
-
createUnhandledTypeExceptionWritableFile
-
isHandledItem
- Specified by:
isHandledItem
in interfaceAIoHandler
-
isHandledFile
- Specified by:
isHandledFile
in interfaceAIoHandler
-
isHandledDirectory
- Specified by:
isHandledDirectory
in interfaceAIoHandler
-
isHandledReadableFile
- Specified by:
isHandledReadableFile
in interfaceAIoHandler
-
isHandledWritableFile
- Specified by:
isHandledWritableFile
in interfaceAIoHandler
-
validateHandledFile
- Specified by:
validateHandledFile
in interfaceAIoHandler
-
validateHandledDirectory
- Specified by:
validateHandledDirectory
in interfaceAIoHandler
-
validateHandledReadableFile
- Specified by:
validateHandledReadableFile
in interfaceAIoHandler
-
validateHandledWritableFile
- Specified by:
validateHandledWritableFile
in interfaceAIoHandler
-
castReadableFile
-
castWritableFile
-
toSubjectFile
-
toSubjectDirectory
-
subjectFileSize
-
subjectFileExists
-
subjectDirectoryExists
-
size
- Specified by:
size
in interfaceAIoHandler
-
exists
- Specified by:
exists
in interfaceAIoHandler
-
exists
- Specified by:
exists
in interfaceAIoHandler
-
listItems
- Specified by:
listItems
in interfaceAIoHandler
-
listDirectories
- Specified by:
listDirectories
in interfaceAIoHandler
-
listFiles
- Specified by:
listFiles
in interfaceAIoHandler
-
inventorize
- Specified by:
inventorize
in interfaceAIoHandler
-
openReading
- Specified by:
openReading
in interfaceAIoHandler
-
isOpen
- Specified by:
isOpen
in interfaceAIoHandler
-
close
- Specified by:
close
in interfaceAIoHandler
-
openWriting
- Specified by:
openWriting
in interfaceAIoHandler
-
create
- Specified by:
create
in interfaceAIoHandler
-
create
- Specified by:
create
in interfaceAIoHandler
-
ensureExists
- Specified by:
ensureExists
in interfaceAIoHandler
-
ensureExists
- Specified by:
ensureExists
in interfaceAIoHandler
-
readBytes
- Specified by:
readBytes
in interfaceAIoHandler
-
readBytes
- Specified by:
readBytes
in interfaceAIoHandler
-
readBytes
- Specified by:
readBytes
in interfaceAIoHandler
-
readBytes
- Specified by:
readBytes
in interfaceAIoHandler
-
readBytes
- Specified by:
readBytes
in interfaceAIoHandler
-
readBytes
public long readBytes(AReadableFile sourceFile, ByteBuffer targetBuffer, long position, long length)- Specified by:
readBytes
in interfaceAIoHandler
-
readBytes
- Specified by:
readBytes
in interfaceAIoHandler
-
readBytes
- Specified by:
readBytes
in interfaceAIoHandler
-
readBytes
public long readBytes(AReadableFile sourceFile, BufferProvider bufferProvider, long position, long length)- Specified by:
readBytes
in interfaceAIoHandler
-
copyTo
- Specified by:
copyTo
in interfaceAIoHandler
-
copyTo
- Specified by:
copyTo
in interfaceAIoHandler
-
copyTo
public long copyTo(AReadableFile sourceSubject, long sourcePosition, long length, AWritableFile target)- Specified by:
copyTo
in interfaceAIoHandler
-
copyFrom
- Specified by:
copyFrom
in interfaceAIoHandler
-
copyFrom
- Specified by:
copyFrom
in interfaceAIoHandler
-
copyFrom
public long copyFrom(AReadableFile source, long sourcePosition, long length, AWritableFile targetSubject)- Specified by:
copyFrom
in interfaceAIoHandler
-
writeBytes
- Specified by:
writeBytes
in interfaceAIoHandler
-
moveFile
- Specified by:
moveFile
in interfaceAIoHandler
-
deleteFile
- Specified by:
deleteFile
in interfaceAIoHandler
-
truncate
- Specified by:
truncate
in interfaceAIoHandler
-