Class FMFileAccessController
java.lang.Object
com.biglybt.core.diskmanager.file.impl.FMFileAccessController
- All Implemented Interfaces:
FMFileAccess
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
Nested classes/interfaces inherited from interface com.biglybt.core.diskmanager.file.impl.FMFileAccess
FMFileAccess.FileAccessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate File
private String
private static boolean
private FMFileAccess
private final FMFileImpl
private static final String
private static final boolean
private int
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
FMFileAccessController
(FMFileImpl _file, int _target_type, boolean _force) -
Method Summary
Modifier and TypeMethodDescriptionvoid
private void
convert
(int target_type, boolean force) private void
convertSupport
(int target_type, boolean force) void
flush()
getFile()
long
int
boolean
isPieceCompleteProcessingNeeded
(int piece_number) void
read
(FMFileAccess.FileAccessor fa, DirectByteBuffer[] buffers, long offset) protected void
void
setLength
(FMFileAccess.FileAccessor fa, long length) void
setPieceComplete
(FMFileAccess.FileAccessor fa, int piece_number, DirectByteBuffer piece_data) void
setStorageType
(int new_type, boolean force) void
write
(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:
aboutToOpen
in interfaceFMFileAccess
- Throws:
FMFileManagerException
-
getLength
- Specified by:
getLength
in interfaceFMFileAccess
- Throws:
FMFileManagerException
-
setLength
- Specified by:
setLength
in interfaceFMFileAccess
- Throws:
FMFileManagerException
-
isPieceCompleteProcessingNeeded
public boolean isPieceCompleteProcessingNeeded(int piece_number) - Specified by:
isPieceCompleteProcessingNeeded
in interfaceFMFileAccess
-
setPieceComplete
public void setPieceComplete(FMFileAccess.FileAccessor fa, int piece_number, DirectByteBuffer piece_data) throws FMFileManagerException - Specified by:
setPieceComplete
in interfaceFMFileAccess
- Throws:
FMFileManagerException
-
read
public void read(FMFileAccess.FileAccessor fa, DirectByteBuffer[] buffers, long offset) throws FMFileManagerException - Specified by:
read
in interfaceFMFileAccess
- Throws:
FMFileManagerException
-
write
public void write(FMFileAccess.FileAccessor fa, DirectByteBuffer[] buffers, long position) throws FMFileManagerException - Specified by:
write
in interfaceFMFileAccess
- Throws:
FMFileManagerException
-
flush
- Specified by:
flush
in interfaceFMFileAccess
- Throws:
FMFileManagerException
-
getFile
- Specified by:
getFile
in interfaceFMFileAccess
-
getString
- Specified by:
getString
in interfaceFMFileAccess
-