Use real free/total disk space values for the repository filesystem, if the content store supports them. ALF-1530.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@22893 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2010-10-05 15:41:40 +00:00
parent 00ea243bc3
commit 843e1b27b3
2 changed files with 61 additions and 6 deletions

View File

@@ -98,12 +98,18 @@ public class ContentQuotaManager implements QuotaManager, Runnable {
* @return long
*/
public long getAvailableFreeSpace() {
// Get the live free space value from the content store, if supported
// Return a dummy value for now
//
// Need to find the content store size and return the live available space value if possible
return 100 * MemorySize.GIGABYTE;
long freeSpace = m_filesys.getContentService().getStoreFreeSpace();
if ( freeSpace == -1L) {
// Content store does not support sizing, return a large dummy value
freeSpace = ContentDiskDriver.DiskFreeDefault;
}
return freeSpace;
}
/**