public class QuotaManager extends Object
| Modifier and Type | Class | Description |
|---|---|---|
protected class |
QuotaManager.Worker |
| Modifier and Type | Field | Description |
|---|---|---|
protected StatisticData |
stats |
|
protected Date |
statsTimestamp |
|
protected long |
totalSize |
|
protected long |
workerExecutionTime |
|
protected Thread |
workerThread |
|
protected Map<String,Long> |
workspaceCache |
|
protected WorkspaceManager |
workspaceManager |
| Modifier and Type | Method | 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
|
StatisticData |
getStats() |
Gets the statistics on the page.
|
long |
getTotalSize() |
Retuns the total size in bytes from all workspaces or 0L if it fails.
|
StatisticData |
getUserStats(UserManager user) |
Gets the user stats.
|
long |
getWorkspaceSize(Workspace workspace) |
Returns the size in bytes of all archives together in the workspace or
0L if it fails. |
long |
updateWorkspace(Workspace workspace) |
Updates the size of the workspace
|
long |
updateWorkspace(String workspaceId) |
Updates the size of the workspace or removes the result from the cache, if the workspace is not available anymore
|
protected WorkspaceManager workspaceManager
protected long totalSize
protected Thread workerThread
protected long workerExecutionTime
protected StatisticData stats
protected Date statsTimestamp
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.workspace - the workspacepublic long updateWorkspace(String workspaceId)
workspaceId - id of the workspacepublic StatisticData getStats()
public StatisticData getUserStats(UserManager user)
user - the userpublic long updateWorkspace(Workspace workspace)
workspace - the workspaceCopyright © 2018 SEMS project @ University of Rostock. All rights reserved.