CasFuseDriverProfile

public class CasFuseDriverProfile
extends Object implements IFuseDriverProfile

java.lang.Object
   ↳ com.android.tradefed.build.CasFuseDriverProfile


CasDriverProfile is a specific implementation of IFuseDriverProfile for device images which are FastCDC chunked directories.

Summary

Public constructors

CasFuseDriverProfile(Path driverPath)

Creates a new CasFuseDriverProfile with the given driver path.

CasFuseDriverProfile(Path driverPath, long mountTimeoutInMs)

Creates a new CasFuseDriverProfile with the given driver path and mount timeout.

Public methods

List<String> buildMountCommand(Path sourceDataPath, Path mountPoint)

Creates the command line to execute the mount command.

List<String> buildMountCommand(Path sourceDataPath, Path mountPoint, Path logDir)

Creates the command line to execute the mount command and log to the given directory.

String getDriverName()

A descriptive name for this driver type.

long getMountTimeoutInMs()

The default timeout to wait for the mount point to be ready.

boolean isMountPointReady(Path mountPoint)

Checks if the mount point is ready to be used.

void validateSourceDataPath(Path sourceDataPath)

Validates the given source data path for CAS FUSE mounting.

Public constructors

CasFuseDriverProfile

public CasFuseDriverProfile (Path driverPath)

Creates a new CasFuseDriverProfile with the given driver path.

Parameters
driverPath Path: The path to the driver binary.

CasFuseDriverProfile

public CasFuseDriverProfile (Path driverPath, 
                long mountTimeoutInMs)

Creates a new CasFuseDriverProfile with the given driver path and mount timeout.

Parameters
driverPath Path: The path to the driver binary.

mountTimeoutInMs long: The timeout in milliseconds to wait for the mount point to be ready.

Public methods

buildMountCommand

public List<String> buildMountCommand (Path sourceDataPath, 
                Path mountPoint)

Creates the command line to execute the mount command.

Parameters
sourceDataPath Path: The source data path.

mountPoint Path: The target mount point.

Returns
List<String> A list of string representing the command line to execute.

buildMountCommand

public List<String> buildMountCommand (Path sourceDataPath, 
                Path mountPoint, 
                Path logDir)

Creates the command line to execute the mount command and log to the given directory.

Parameters
sourceDataPath Path: The source data path.

mountPoint Path: The target mount point.

logDir Path: The directory to store the log files.

Returns
List<String> A list of string representing the command line to execute.

getDriverName

public String getDriverName ()

A descriptive name for this driver type.

Returns
String The driver's name (e.g., "FastCDC", "sshfs").

getMountTimeoutInMs

public long getMountTimeoutInMs ()

The default timeout to wait for the mount point to be ready.

Returns
long The default timeout in milliseconds.

isMountPointReady

public boolean isMountPointReady (Path mountPoint)

Checks if the mount point is ready to be used.

Parameters
mountPoint Path: The mount point to check.

Returns
boolean True if the mount point is ready, false otherwise.

validateSourceDataPath

public void validateSourceDataPath (Path sourceDataPath)

Validates the given source data path for CAS FUSE mounting. that are structured as:

Parameters
sourceDataPath Path: The path to the source data.

Throws
IOException If the source data path is invalid.