2.17.2: 2011-06-17

net.sf.basedb.core
Class DiskUsageStatistics.Summary

java.lang.Object
  extended by 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
private  long creationTime
           
private  Map<String,Long> diskUsage
           
 
Constructor Summary
private DiskUsageStatistics.Summary()
           
private DiskUsageStatistics.Summary(Group group)
           
private DiskUsageStatistics.Summary(User user)
           
 
Method Summary
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 bytes
 long 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 the DiskUsageStatistics.getMaxAge().
private  void loadDiskUsage(org.hibernate.Query query)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

creationTime

private final long creationTime

diskUsage

private final Map<String,Long> diskUsage
Constructor Detail

DiskUsageStatistics.Summary

private DiskUsageStatistics.Summary()

DiskUsageStatistics.Summary

private DiskUsageStatistics.Summary(User user)

DiskUsageStatistics.Summary

private DiskUsageStatistics.Summary(Group group)
Method Detail

loadDiskUsage

private void loadDiskUsage(org.hibernate.Query query)

add

private Long add(Long a,
                 Long b)

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 the DiskUsageStatistics.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

getTotal

public long getTotal(QuotaType quotaType,
                     Location location)
Get the total disk usage of the specified location and quota type in bytes.

Parameters:
location - The location to get the disk usage for
quotaType - The quota type to get the disk usage for

2.17.2: 2011-06-17