Class FMFileAccessController
java.lang.Object
com.biglybt.core.diskmanager.file.impl.FMFileAccessController
- All Implemented Interfaces:
FMFileAccess
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface FMFileAccess
FMFileAccess.FileAccessor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Fileprivate Stringprivate static booleanprivate FMFileAccessprivate final FMFileImplprivate static final Stringprivate static final booleanprivate int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFMFileAccessController(FMFileImpl _file, int _target_type, boolean _force) -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidconvert(int target_type, boolean force) private voidconvertSupport(int target_type, boolean force) voidflush()getFile()longintbooleanisPieceCompleteProcessingNeeded(int piece_number) voidread(FMFileAccess.FileAccessor fa, DirectByteBuffer[] buffers, long offset) protected voidvoidsetLength(FMFileAccess.FileAccessor fa, long length) voidsetPieceComplete(FMFileAccess.FileAccessor fa, int piece_number, DirectByteBuffer piece_data) voidsetStorageType(int new_type, boolean force) voidwrite(FMFileAccess.FileAccessor fa, DirectByteBuffer[] buffers, long position)
-
Field Details
-
REORDER_SUFFIX
- See Also:
-
TEST_PIECE_REORDER
private static final boolean TEST_PIECE_REORDER -
enable_sparse_files
private static boolean enable_sparse_files -
owner
-
type
private int type -
control_dir
-
controlFileName
-
file_access
-
-
Constructor Details
-
FMFileAccessController
protected FMFileAccessController(FMFileImpl _file, int _target_type, boolean _force) throws FMFileManagerException - Throws:
FMFileManagerException
-
-
Method Details
-
convert
- Throws:
FMFileManagerException
-
convertSupport
- Throws:
FMFileManagerException
-
setControlFile
protected void setControlFile() -
setStorageType
- Throws:
FMFileManagerException
-
getStorageType
public int getStorageType() -
aboutToOpen
- Specified by:
aboutToOpenin interfaceFMFileAccess- Throws:
FMFileManagerException
-
getLength
- Specified by:
getLengthin interfaceFMFileAccess- Throws:
FMFileManagerException
-
setLength
- Specified by:
setLengthin interfaceFMFileAccess- Throws:
FMFileManagerException
-
isPieceCompleteProcessingNeeded
public boolean isPieceCompleteProcessingNeeded(int piece_number) - Specified by:
isPieceCompleteProcessingNeededin interfaceFMFileAccess
-
setPieceComplete
public void setPieceComplete(FMFileAccess.FileAccessor fa, int piece_number, DirectByteBuffer piece_data) throws FMFileManagerException - Specified by:
setPieceCompletein interfaceFMFileAccess- Throws:
FMFileManagerException
-
read
public void read(FMFileAccess.FileAccessor fa, DirectByteBuffer[] buffers, long offset) throws FMFileManagerException - Specified by:
readin interfaceFMFileAccess- Throws:
FMFileManagerException
-
write
public void write(FMFileAccess.FileAccessor fa, DirectByteBuffer[] buffers, long position) throws FMFileManagerException - Specified by:
writein interfaceFMFileAccess- Throws:
FMFileManagerException
-
flush
- Specified by:
flushin interfaceFMFileAccess- Throws:
FMFileManagerException
-
getFile
- Specified by:
getFilein interfaceFMFileAccess
-
getString
- Specified by:
getStringin interfaceFMFileAccess
-