Package net.sf.basedb.core
Class DiskUsageStatistics.Summary
java.lang.Object
net.sf.basedb.core.DiskUsageStatistics.Summary
- Enclosing class:
- DiskUsageStatistics
public class DiskUsageStatistics.Summary extends Object
Holds summary disk usage information for the total disk usage or for
a specific user or group.
-
Field Summary
Fields Modifier and Type Field Description private long
creationTime
private Map<String,Long>
diskUsage
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description private Long
add(Long a, Long b)
int
getAge()
Get the age of this summary object since it was created in seconds.long
getTotal()
Get the total disk usage in byteslong
getTotal(Location location)
Get the total disk usage of the specified location in bytes.long
getTotal(QuotaType quotaType)
Get the total disk usage for the specified quota type in bytes.long
getTotal(QuotaType quotaType, Location location)
Get the total disk usage of the specified location and quota type in bytes.boolean
isOld()
Check if this summary object is old by comparing it's age to theDiskUsageStatistics.getMaxAge()
.private void
loadDiskUsage(Query<Object[]> query)
-
Field Details
-
creationTime
private final long creationTime -
diskUsage
-
-
Constructor Details
-
Summary
private Summary() -
Summary
-
Summary
-
-
Method Details
-
loadDiskUsage
-
add
-
getAge
public int getAge()Get the age of this summary object since it was created in seconds.- Returns:
- The age in seconds
-
isOld
public boolean isOld()Check if this summary object is old by comparing it's age to theDiskUsageStatistics.getMaxAge()
.- Returns:
- TRUE if the summary is old, FALSE otherwise
-
getTotal
public long getTotal()Get the total disk usage in bytes -
getTotal
Get the total disk usage of the specified location in bytes.- Parameters:
location
- The location to get the disk usage for
-
getTotal
Get the total disk usage for the specified quota type in bytes.- Parameters:
quotaType
- The quota type to get the disk usage for
-
getTotal
Get the total disk usage of the specified location and quota type in bytes.- Parameters:
location
- The location to get the disk usage forquotaType
- The quota type to get the disk usage for
-