public class BufferedContentDiskDriver extends Object implements ExtendedDiskInterface, org.alfresco.jlan.server.filesys.DiskInterface, org.alfresco.jlan.server.filesys.DiskSizeInterface, org.alfresco.jlan.server.filesys.IOCtlInterface, org.alfresco.jlan.server.locking.OpLockInterface, org.alfresco.jlan.server.locking.FileLockingInterface, NodeServicePolicies.OnDeleteNodePolicy, NodeServicePolicies.OnMoveNodePolicy
Decorates ContentDiskDriver with a performance cache of some frequently used results. In particular for getFileInformation and fileExists
Policy.Arg
QNAME
QNAME
Constructor and Description |
---|
BufferedContentDiskDriver() |
Modifier and Type | Method and Description |
---|---|
void |
closeFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile param) |
org.alfresco.jlan.server.core.DeviceContext |
createContext(String shareName,
org.springframework.extensions.config.ConfigElement args) |
void |
createDirectory(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.FileOpenParams params) |
org.alfresco.jlan.server.filesys.NetworkFile |
createFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.FileOpenParams params) |
void |
deleteDirectory(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String dir) |
void |
deleteFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String name) |
int |
fileExists(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String path) |
void |
flushFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file) |
void |
getDiskInformation(org.alfresco.jlan.server.filesys.DiskDeviceContext ctx,
org.alfresco.jlan.server.filesys.SrvDiskInfo diskDev) |
ExtendedDiskInterface |
getDiskInterface() |
org.alfresco.jlan.server.filesys.DiskSizeInterface |
getDiskSizeInterface() |
org.alfresco.jlan.server.filesys.FileInfo |
getFileInformation(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String path) |
org.alfresco.jlan.server.locking.FileLockingInterface |
getFileLockingInterface() |
org.alfresco.jlan.server.filesys.IOCtlInterface |
getIoctlInterface() |
org.alfresco.jlan.server.locking.LockManager |
getLockManager(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree) |
org.alfresco.jlan.server.locking.OpLockInterface |
getOpLockInterface() |
org.alfresco.jlan.server.locking.OpLockManager |
getOpLockManager(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree) |
PolicyComponent |
getPolicyComponent() |
void |
init() |
boolean |
isOpLocksEnabled(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree) |
boolean |
isReadOnly(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.core.DeviceContext ctx) |
void |
onDeleteNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef,
boolean isArchived)
Called after a node is deleted.
|
void |
onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef,
org.alfresco.service.cmr.repository.ChildAssociationRef newChildAssocRef)
Called when a node has been moved.
|
org.alfresco.jlan.server.filesys.NetworkFile |
openFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.FileOpenParams params) |
org.alfresco.jlan.util.DataBuffer |
processIOControl(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
int ctrlCode,
int fid,
org.alfresco.jlan.util.DataBuffer dataBuf,
boolean isFSCtrl,
int filter) |
int |
readFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file,
byte[] buf,
int bufPos,
int siz,
long filePos) |
void |
registerContext(org.alfresco.jlan.server.core.DeviceContext ctx)
Register an independently created device context object for this instance of the shared device.
|
void |
renameFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String oldName,
String newName) |
long |
seekFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file,
long pos,
int typ) |
void |
setDiskInterface(ExtendedDiskInterface diskInterface) |
void |
setDiskSizeInterface(org.alfresco.jlan.server.filesys.DiskSizeInterface diskSizeInterface) |
void |
setFileInfoCache(org.alfresco.repo.cache.SimpleCache<Serializable,org.alfresco.jlan.server.filesys.FileInfo> cache)
Set the cache that maintains node ID-NodeRef cross referencing data
|
void |
setFileInformation(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String name,
org.alfresco.jlan.server.filesys.FileInfo info) |
void |
setFileLockingInterface(org.alfresco.jlan.server.locking.FileLockingInterface fileLockingInterface) |
void |
setIoctlInterface(org.alfresco.jlan.server.filesys.IOCtlInterface iocltlInterface) |
void |
setOpLockInterface(org.alfresco.jlan.server.locking.OpLockInterface opLockInterface) |
void |
setPolicyComponent(PolicyComponent policyComponent) |
org.alfresco.jlan.server.filesys.SearchContext |
startSearch(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String searchPath,
int attrib) |
void |
treeClosed(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree) |
void |
treeOpened(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree) |
void |
truncateFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file,
long siz) |
int |
writeFile(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
org.alfresco.jlan.server.filesys.NetworkFile file,
byte[] buf,
int bufoff,
int siz,
long fileoff) |
public void init()
public void setFileInfoCache(org.alfresco.repo.cache.SimpleCache<Serializable,org.alfresco.jlan.server.filesys.FileInfo> cache)
cache
- the cachepublic org.alfresco.jlan.server.filesys.FileInfo getFileInformation(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String path) throws IOException
getFileInformation
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public int fileExists(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String path)
fileExists
in interface org.alfresco.jlan.server.filesys.DiskInterface
public org.alfresco.jlan.server.core.DeviceContext createContext(String shareName, org.springframework.extensions.config.ConfigElement args) throws org.alfresco.jlan.server.core.DeviceContextException
createContext
in interface org.alfresco.jlan.server.core.DeviceInterface
org.alfresco.jlan.server.core.DeviceContextException
public void treeOpened(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree)
treeOpened
in interface org.alfresco.jlan.server.core.DeviceInterface
public void treeClosed(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree)
treeClosed
in interface org.alfresco.jlan.server.core.DeviceInterface
public org.alfresco.jlan.util.DataBuffer processIOControl(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, int ctrlCode, int fid, org.alfresco.jlan.util.DataBuffer dataBuf, boolean isFSCtrl, int filter) throws org.alfresco.jlan.server.filesys.IOControlNotImplementedException, org.alfresco.jlan.smb.SMBException
processIOControl
in interface org.alfresco.jlan.server.filesys.IOCtlInterface
org.alfresco.jlan.server.filesys.IOControlNotImplementedException
org.alfresco.jlan.smb.SMBException
public void getDiskInformation(org.alfresco.jlan.server.filesys.DiskDeviceContext ctx, org.alfresco.jlan.server.filesys.SrvDiskInfo diskDev) throws IOException
getDiskInformation
in interface org.alfresco.jlan.server.filesys.DiskSizeInterface
IOException
public void closeFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile param) throws IOException
closeFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void createDirectory(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.FileOpenParams params) throws IOException
createDirectory
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public org.alfresco.jlan.server.filesys.NetworkFile createFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.FileOpenParams params) throws IOException
createFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void deleteDirectory(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String dir) throws IOException
deleteDirectory
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void deleteFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String name) throws IOException
deleteFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void flushFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file) throws IOException
flushFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public boolean isReadOnly(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.core.DeviceContext ctx) throws IOException
isReadOnly
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public org.alfresco.jlan.server.filesys.NetworkFile openFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.FileOpenParams params) throws IOException
openFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public int readFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file, byte[] buf, int bufPos, int siz, long filePos) throws IOException
readFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void renameFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String oldName, String newName) throws IOException
renameFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public long seekFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file, long pos, int typ) throws IOException
seekFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void setFileInformation(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String name, org.alfresco.jlan.server.filesys.FileInfo info) throws IOException
setFileInformation
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public org.alfresco.jlan.server.filesys.SearchContext startSearch(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, String searchPath, int attrib) throws FileNotFoundException
startSearch
in interface org.alfresco.jlan.server.filesys.DiskInterface
FileNotFoundException
public void truncateFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file, long siz) throws IOException
truncateFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public int writeFile(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree, org.alfresco.jlan.server.filesys.NetworkFile file, byte[] buf, int bufoff, int siz, long fileoff) throws IOException
writeFile
in interface org.alfresco.jlan.server.filesys.DiskInterface
IOException
public void registerContext(org.alfresco.jlan.server.core.DeviceContext ctx) throws org.alfresco.jlan.server.core.DeviceContextException
ExtendedDiskInterface
registerContext
in interface ExtendedDiskInterface
ctx
- the device contextorg.alfresco.jlan.server.core.DeviceContextException
public void setDiskInterface(ExtendedDiskInterface diskInterface)
public ExtendedDiskInterface getDiskInterface()
public void setDiskSizeInterface(org.alfresco.jlan.server.filesys.DiskSizeInterface diskSizeInterface)
public org.alfresco.jlan.server.filesys.DiskSizeInterface getDiskSizeInterface()
public void setIoctlInterface(org.alfresco.jlan.server.filesys.IOCtlInterface iocltlInterface)
public org.alfresco.jlan.server.filesys.IOCtlInterface getIoctlInterface()
public void onMoveNode(org.alfresco.service.cmr.repository.ChildAssociationRef oldChildAssocRef, org.alfresco.service.cmr.repository.ChildAssociationRef newChildAssocRef)
NodeServicePolicies.OnMoveNodePolicy
onMoveNode
in interface NodeServicePolicies.OnMoveNodePolicy
oldChildAssocRef
- 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.OnDeleteNodePolicy
onDeleteNode
in interface NodeServicePolicies.OnDeleteNodePolicy
oldChildAssocRef
- 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(org.alfresco.jlan.server.locking.OpLockInterface opLockInterface)
public org.alfresco.jlan.server.locking.OpLockInterface getOpLockInterface()
public org.alfresco.jlan.server.locking.OpLockManager getOpLockManager(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree)
getOpLockManager
in interface org.alfresco.jlan.server.locking.OpLockInterface
public boolean isOpLocksEnabled(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree)
isOpLocksEnabled
in interface org.alfresco.jlan.server.locking.OpLockInterface
public org.alfresco.jlan.server.locking.LockManager getLockManager(org.alfresco.jlan.server.SrvSession sess, org.alfresco.jlan.server.filesys.TreeConnection tree)
getLockManager
in interface org.alfresco.jlan.server.locking.FileLockingInterface
public void setFileLockingInterface(org.alfresco.jlan.server.locking.FileLockingInterface fileLockingInterface)
public org.alfresco.jlan.server.locking.FileLockingInterface getFileLockingInterface()
Copyright © 2005–2017 Alfresco Software. All rights reserved.