FuseMountManager
public
class
FuseMountManager
extends Object
| java.lang.Object | |
| ↳ | com.android.tradefed.build.FuseMountManager |
摘要
公用建構函式 | |
|---|---|
FuseMountManager(IFuseDriverProfile driverProfile)
Creates a new FuseMountManager with the given driver profile and default run util and mount root. |
|
FuseMountManager(IFuseDriverProfile driverProfile, IRunUtil runUtil, Path mountRoot)
使用指定的驅動程式設定檔、執行公用程式和掛接根目錄,建立新的 FuseMountManager。 |
|
公用方法 | |
|---|---|
static
boolean
|
cleanUp(Path mountPoint, IRunUtil runUtil)
清除掛接點目錄。 |
Path
|
mount(Path sourceDataPath)
將指定的來源資料路徑掛接至專門建立的掛接點。 |
void
|
unmount(Path sourceDataPath)
卸載與指定來源資料路徑相關聯的檔案系統。 |
void
|
unmountAll()
平行卸載所有追蹤的檔案系統。 |
公用建構函式
FuseMountManager
public FuseMountManager (IFuseDriverProfile driverProfile)
使用指定的驅動程式設定檔、預設執行公用程式和掛接根目錄,建立新的 FuseMountManager。
| 參數 | |
|---|---|
driverProfile |
IFuseDriverProfile:要使用的駕駛人設定檔。 |
FuseMountManager
public FuseMountManager (IFuseDriverProfile driverProfile, IRunUtil runUtil, Path mountRoot)
使用指定的驅動程式設定檔、執行公用程式和掛接根目錄,建立新的 FuseMountManager。
| 參數 | |
|---|---|
driverProfile |
IFuseDriverProfile:要使用的駕駛人設定檔。 |
runUtil |
IRunUtil:要使用的執行公用程式。 |
mountRoot |
Path:用於建立掛接點的基本路徑。 |
公用方法
cleanUp
public static boolean cleanUp (Path mountPoint,
IRunUtil runUtil)清除掛接點目錄。這個方法會記錄所有例外狀況,但不會擲回,因為這是盡可能完成的清理作業。
這個方法會重試延遲卸載,並刪除掛接點目錄。如果目錄仍然存在,系統會重試延遲卸載和刪除作業,直到達到期限為止。
| 參數 | |
|---|---|
mountPoint |
Path:要刪除的掛接點。 |
runUtil |
IRunUtil:用於執行指令的 IRunUtil。 |
| 傳回 | |
|---|---|
boolean |
|
mount
public Path mount (Path sourceDataPath)
將指定的來源資料路徑掛接到唯一建立的掛接點。這個方法是等冪的:如果已掛接相同的來源路徑,這個方法會傳回現有的掛接點。
| 參數 | |
|---|---|
sourceDataPath |
Path:要掛接的來源資料路徑。 |
| 傳回 | |
|---|---|
Path |
Path 至新掛接點,來源位於該處。 |
| 擲回 | |
|---|---|
IOException |
如果掛接程序無法啟動或逾時。 |
InterruptedException |
如果安裝螺紋中斷。 |
卸載
public void unmount (Path sourceDataPath)
卸載與指定來源資料路徑相關聯的檔案系統。這會正常終止 FUSE 程序,並清除掛接點目錄。
| 參數 | |
|---|---|
sourceDataPath |
Path:要解除掛接的來源資料路徑。 |
unmountAll
public void unmountAll ()
平行卸載所有追蹤的檔案系統。
這個方法會使用執行緒集區,以平行方式卸載所有追蹤的檔案系統。當所有檔案系統都需要卸載時,例如關閉 FuseMountManager 時,就適合使用這個函式。