Merge "Add shell cmd blob_store idle-maintenance." into rvc-dev am: 29c8617d36 am: f379a1090c
Change-Id: I959ec3d4da34032f76f6c17d6a1b9645273e809b
This commit is contained in:
@@ -939,6 +939,12 @@ public class BlobStoreManagerService extends SystemService {
|
||||
}
|
||||
}
|
||||
|
||||
void runIdleMaintenance() {
|
||||
synchronized (mBlobsLock) {
|
||||
handleIdleMaintenanceLocked();
|
||||
}
|
||||
}
|
||||
|
||||
@GuardedBy("mBlobsLock")
|
||||
private void dumpSessionsLocked(IndentingPrintWriter fout, DumpArgs dumpArgs) {
|
||||
for (int i = 0, userCount = mSessions.size(); i < userCount; ++i) {
|
||||
@@ -1408,9 +1414,7 @@ public class BlobStoreManagerService extends SystemService {
|
||||
private class LocalService extends BlobStoreManagerInternal {
|
||||
@Override
|
||||
public void onIdleMaintenance() {
|
||||
synchronized (mBlobsLock) {
|
||||
handleIdleMaintenanceLocked();
|
||||
}
|
||||
runIdleMaintenance();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ class BlobStoreManagerShellCommand extends ShellCommand {
|
||||
return runClearAllBlobs(pw);
|
||||
case "delete-blob":
|
||||
return runDeleteBlob(pw);
|
||||
case "idle-maintenance":
|
||||
return runIdleMaintenance(pw);
|
||||
default:
|
||||
return handleDefaultCommands(cmd);
|
||||
}
|
||||
@@ -84,6 +86,11 @@ class BlobStoreManagerShellCommand extends ShellCommand {
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int runIdleMaintenance(PrintWriter pw) {
|
||||
mService.runIdleMaintenance();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHelp() {
|
||||
final PrintWriter pw = getOutPrintWriter();
|
||||
@@ -112,6 +119,8 @@ class BlobStoreManagerShellCommand extends ShellCommand {
|
||||
pw.println(" --expiry: Expiry time of the blob to delete, in milliseconds.");
|
||||
pw.println(" --label: Label of the blob to delete.");
|
||||
pw.println(" --tag: Tag of the blob to delete.");
|
||||
pw.println("idle-maintenance");
|
||||
pw.println(" Run idle maintenance which takes care of removing stale data.");
|
||||
pw.println();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user