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
-
Method Summary
All Methods Instance Methods Concrete Methods 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(org.hibernate.query.Query<Object[]> query)
-
-
-
Method Detail
-
loadDiskUsage
private void loadDiskUsage(org.hibernate.query.Query<Object[]> query)
-
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
public long getTotal(Location location)
Get the total disk usage of the specified location in bytes.- Parameters:
location
- The location to get the disk usage for
-
getTotal
public long getTotal(QuotaType quotaType)
Get the total disk usage for the specified quota type in bytes.- Parameters:
quotaType
- The quota type to get the disk usage for
-
-