public class NonTransactionalRuleContentDiskDriver extends Object implements ExtendedDiskInterface
Provides a DiskInterface that deals with "shuffles". Shuffles are implemented by the Rules Engine.
Sits on top of the repository and is non-retryable and non-transactional. It is, however thread safe and multiple callers may call in parallel.
Constructor and Description |
---|
NonTransactionalRuleContentDiskDriver() |
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) |
CommandExecutor |
getCommandExecutor() |
ExtendedDiskInterface |
getDiskInterface() |
org.alfresco.jlan.server.filesys.FileInfo |
getFileInformation(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.filesys.TreeConnection tree,
String path) |
RepositoryDiskInterface |
getRepositoryDiskInterface() |
RuleEvaluator |
getRuleEvaluator() |
void |
init() |
boolean |
isReadOnly(org.alfresco.jlan.server.SrvSession sess,
org.alfresco.jlan.server.core.DeviceContext ctx) |
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 param) |
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 oldPath,
String newPath) |
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 |
setCommandExecutor(CommandExecutor commandExecutor) |
void |
setDiskInterface(ExtendedDiskInterface diskInterface) |
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 |
setRepositoryDiskInterface(RepositoryDiskInterface repositoryDiskInterface) |
void |
setRuleEvaluator(RuleEvaluator ruleEvaluator) |
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 NonTransactionalRuleContentDiskDriver()
public void init()
public 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 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 param) 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 oldPath, String newPath) 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 setDiskInterface(ExtendedDiskInterface diskInterface)
public ExtendedDiskInterface getDiskInterface()
public void setRuleEvaluator(RuleEvaluator ruleEvaluator)
public RuleEvaluator getRuleEvaluator()
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 setRepositoryDiskInterface(RepositoryDiskInterface repositoryDiskInterface)
public RepositoryDiskInterface getRepositoryDiskInterface()
public void setCommandExecutor(CommandExecutor commandExecutor)
public CommandExecutor getCommandExecutor()
Copyright © 2005–2017 Alfresco Software. All rights reserved.