public class BufferedContentDiskDriver extends Object implements ExtendedDiskInterface, DiskInterface, DiskSizeInterface, IOCtlInterface, OpLockInterface, FileLockingInterface, NodeServicePolicies.OnDeleteNodePolicy, NodeServicePolicies.OnMoveNodePolicy
Decorates ContentDiskDriver with a performance cache of some frequently used results. In particular for getFileInformation and fileExists
Policy.ArgQNAMEQNAME| Constructor and Description |
|---|
BufferedContentDiskDriver() |
public void init()
public void setFileInfoCache(org.alfresco.repo.cache.SimpleCache<Serializable,FileInfo> cache)
cache - the cachepublic FileInfo getFileInformation(SrvSession sess, TreeConnection tree, String path) throws IOException
getFileInformation in interface DiskInterfaceIOExceptionpublic int fileExists(SrvSession sess, TreeConnection tree, String path)
fileExists in interface DiskInterfacepublic DeviceContext createContext(String shareName, org.springframework.extensions.config.ConfigElement args) throws DeviceContextException
createContext in interface DeviceInterfaceDeviceContextExceptionpublic void treeOpened(SrvSession sess, TreeConnection tree)
treeOpened in interface DeviceInterfacepublic void treeClosed(SrvSession sess, TreeConnection tree)
treeClosed in interface DeviceInterfacepublic DataBuffer processIOControl(SrvSession sess, TreeConnection tree, int ctrlCode, int fid, DataBuffer dataBuf, boolean isFSCtrl, int filter) throws IOControlNotImplementedException, SMBException
processIOControl in interface IOCtlInterfaceIOControlNotImplementedExceptionSMBExceptionpublic void getDiskInformation(DiskDeviceContext ctx, SrvDiskInfo diskDev) throws IOException
getDiskInformation in interface DiskSizeInterfaceIOExceptionpublic void closeFile(SrvSession sess, TreeConnection tree, NetworkFile param) throws IOException
closeFile in interface DiskInterfaceIOExceptionpublic void createDirectory(SrvSession sess, TreeConnection tree, FileOpenParams params) throws IOException
createDirectory in interface DiskInterfaceIOExceptionpublic NetworkFile createFile(SrvSession sess, TreeConnection tree, FileOpenParams params) throws IOException
createFile in interface DiskInterfaceIOExceptionpublic void deleteDirectory(SrvSession sess, TreeConnection tree, String dir) throws IOException
deleteDirectory in interface DiskInterfaceIOExceptionpublic void deleteFile(SrvSession sess, TreeConnection tree, String name) throws IOException
deleteFile in interface DiskInterfaceIOExceptionpublic void flushFile(SrvSession sess, TreeConnection tree, NetworkFile file) throws IOException
flushFile in interface DiskInterfaceIOExceptionpublic boolean isReadOnly(SrvSession sess, DeviceContext ctx) throws IOException
isReadOnly in interface DiskInterfaceIOExceptionpublic NetworkFile openFile(SrvSession sess, TreeConnection tree, FileOpenParams params) throws IOException
openFile in interface DiskInterfaceIOExceptionpublic int readFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufPos, int siz, long filePos) throws IOException
readFile in interface DiskInterfaceIOExceptionpublic void renameFile(SrvSession sess, TreeConnection tree, String oldName, String newName) throws IOException
renameFile in interface DiskInterfaceIOExceptionpublic long seekFile(SrvSession sess, TreeConnection tree, NetworkFile file, long pos, int typ) throws IOException
seekFile in interface DiskInterfaceIOExceptionpublic void setFileInformation(SrvSession sess, TreeConnection tree, String name, FileInfo info) throws IOException
setFileInformation in interface DiskInterfaceIOExceptionpublic SearchContext startSearch(SrvSession sess, TreeConnection tree, String searchPath, int attrib) throws FileNotFoundException
startSearch in interface DiskInterfaceFileNotFoundExceptionpublic void truncateFile(SrvSession sess, TreeConnection tree, NetworkFile file, long siz) throws IOException
truncateFile in interface DiskInterfaceIOExceptionpublic int writeFile(SrvSession sess, TreeConnection tree, NetworkFile file, byte[] buf, int bufoff, int siz, long fileoff) throws IOException
writeFile in interface DiskInterfaceIOExceptionpublic void registerContext(DeviceContext ctx) throws DeviceContextException
ExtendedDiskInterfaceregisterContext in interface ExtendedDiskInterfaceDeviceContextExceptionpublic void setDiskInterface(ExtendedDiskInterface diskInterface)
public ExtendedDiskInterface getDiskInterface()
public void setDiskSizeInterface(DiskSizeInterface diskSizeInterface)
public DiskSizeInterface getDiskSizeInterface()
public void setIoctlInterface(IOCtlInterface iocltlInterface)
public IOCtlInterface getIoctlInterface()
public void onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef,
org.alfresco.service.cmr.repository.ChildAssociationRef newChildAssocRef)
NodeServicePolicies.OnMoveNodePolicyonMoveNode in interface NodeServicePolicies.OnMoveNodePolicyoldChildAssocRef - the child association reference prior to the movenewChildAssocRef - the child association reference after the movepublic void onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef,
boolean isArchived)
NodeServicePolicies.OnDeleteNodePolicyonDeleteNode in interface NodeServicePolicies.OnDeleteNodePolicyoldChildAssocRef - the primary parent-child association of the deleted nodeisArchived - indicates whether the node has been archived rather than purgedpublic void setPolicyComponent(PolicyComponent policyComponent)
public PolicyComponent getPolicyComponent()
public void setOpLockInterface(OpLockInterface opLockInterface)
public OpLockInterface getOpLockInterface()
public OpLockManager getOpLockManager(SrvSession sess, TreeConnection tree)
getOpLockManager in interface OpLockInterfacepublic boolean isOpLocksEnabled(SrvSession sess, TreeConnection tree)
isOpLocksEnabled in interface OpLockInterfacepublic LockManager getLockManager(SrvSession sess, TreeConnection tree)
getLockManager in interface FileLockingInterfacepublic void setFileLockingInterface(FileLockingInterface fileLockingInterface)
public FileLockingInterface getFileLockingInterface()
Copyright © 2005–2014 Alfresco Software. All rights reserved.