public class QuotaManager extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
QuotaManager.Worker |
Modifier and Type | Field and Description |
---|---|
protected long |
totalSize |
protected Map<String,Long> |
workspaceCache |
protected WorkspaceManager |
workspaceManager |
Modifier and Type | Method and Description |
---|---|
void |
forceAsyncScan(boolean storeSettingsAfterwards)
Starts an async scan of all workspaces, also deletes workspaces which are too old
|
static QuotaManager |
getInstance()
Returns the Singleton instance
|
long |
getTotalSize()
Retuns the total size in bytes from all workspaces or 0L if it fails.
|
long |
getWorkspaceSize(Workspace workspace)
Returns the size in bytes of all archives together in the workspace or
0L if it fails. |
long |
updateWorkspace(String workspaceId)
Updates the size of the workspace or removes the result from the cache, if the workspace is not available anymore
|
long |
updateWorkspace(Workspace workspace)
Updates the size of the workspace
|
protected WorkspaceManager workspaceManager
protected long totalSize
public static QuotaManager getInstance()
public long getTotalSize()
public void forceAsyncScan(boolean storeSettingsAfterwards)
storeSettingsAfterwards
- if set to true, the main properties will be stored after the scanpublic long getWorkspaceSize(Workspace workspace)
0L
if it fails.public long updateWorkspace(String workspaceId)
workspaceId
- public long updateWorkspace(Workspace workspace)
workspace
- Copyright © 2014. All rights reserved.