FuseMountManagerFactory

public class FuseMountManagerFactory
extends Object

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


Factory for creating and configuring FuseMountManager instances.

Summary

Protected constructors

FuseMountManagerFactory()

Public methods

static void cleanUp()

Cleans up any orphaned FUSE mounts.

FuseMountManager createCasFuseMountManager()

Creates a new FuseMountManager configured for CAS (Content-Addressable Storage) FUSE driver.

static FuseMountManagerFactory getInstance()

Gets the singleton instance of the factory.

static boolean isFuseAvailable()

Checks if the FUSE kernel module appears to be loaded and ready.

static void shutdownCleanupExecutor()

Protected methods

static void removeStaleMountPoints(Path mountRoot)

Removes stale mount points older than STALE_MOUNT_POINT_THRESHOLD_MS.

Protected constructors

FuseMountManagerFactory

protected FuseMountManagerFactory ()

Public methods

cleanUp

public static void cleanUp ()

Cleans up any orphaned FUSE mounts.

This is intended to be called from a shutdown hook. It will unmount all live mounts.

createCasFuseMountManager

public FuseMountManager createCasFuseMountManager ()

Creates a new FuseMountManager configured for CAS (Content-Addressable Storage) FUSE driver.

Returns
FuseMountManager a configured FuseMountManager.

Throws
IOException if the CAS driver cannot be found or configured.

getInstance

public static FuseMountManagerFactory getInstance ()

Gets the singleton instance of the factory.

Returns
FuseMountManagerFactory

isFuseAvailable

public static boolean isFuseAvailable ()

Checks if the FUSE kernel module appears to be loaded and ready.

Returns
boolean true if /dev/fuse exists, false otherwise.

shutdownCleanupExecutor

public static void shutdownCleanupExecutor ()

Protected methods

removeStaleMountPoints

protected static void removeStaleMountPoints (Path mountRoot)

Removes stale mount points older than STALE_MOUNT_POINT_THRESHOLD_MS.

Parameters
mountRoot Path: The mount root directory to scan for stale mount points.