public class DBQuotaManager extends java.lang.Object implements QuotaManager
Filesystem quota management implementation that uses the JDBC database.
| Constructor and Description |
|---|
DBQuotaManager(DBDeviceContext ctx,
boolean dbg)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
long |
allocateSpace(SrvSession sess,
TreeConnection tree,
NetworkFile file,
long alloc)
Allocate space from the filesystem free space.
|
long |
getAvailableFreeSpace()
Return the available free space in bytes
|
long |
getUserFreeSpace(SrvSession sess,
TreeConnection tree)
Return the free space available to the specified user/session
|
boolean |
hasDebug()
Determine if debug output is enabled
|
void |
releaseSpace(SrvSession sess,
TreeConnection tree,
int fid,
java.lang.String path,
long alloc)
Release space back to the filesystem.
|
void |
setDebug(boolean dbg)
Enable/disable debug output
|
void |
startManager(DiskInterface disk,
DiskDeviceContext ctx)
Start the quota manager
|
void |
stopManager(DiskInterface disk,
DiskDeviceContext ctx)
Stop the quota manager
|
public DBQuotaManager(DBDeviceContext ctx, boolean dbg)
ctx - DBDeviceContextdbg - booleanpublic long allocateSpace(SrvSession sess, TreeConnection tree, NetworkFile file, long alloc) throws java.io.IOException
allocateSpace in interface QuotaManagersess - SrvSessiontree - TreeConnectionfile - NetworkFilealloc - longjava.io.IOExceptionpublic void releaseSpace(SrvSession sess, TreeConnection tree, int fid, java.lang.String path, long alloc) throws java.io.IOException
releaseSpace in interface QuotaManagersess - SrvSessiontree - TreeConnectionfid - intpath - Stringalloc - longjava.io.IOExceptionpublic void startManager(DiskInterface disk, DiskDeviceContext ctx) throws QuotaManagerException
startManager in interface QuotaManagerdisk - DiskInterfacectx - DiskDeviceContextQuotaManagerExceptionpublic void stopManager(DiskInterface disk, DiskDeviceContext ctx) throws QuotaManagerException
stopManager in interface QuotaManagerdisk - DiskInterfacectx - DiskDeviceContextQuotaManagerExceptionpublic long getAvailableFreeSpace()
getAvailableFreeSpace in interface QuotaManagerpublic long getUserFreeSpace(SrvSession sess, TreeConnection tree)
getUserFreeSpace in interface QuotaManagersess - SrvSessiontree - TreeConnectionpublic boolean hasDebug()
public void setDebug(boolean dbg)
dbg - booleanCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.