mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Moved dangerous helper methods out of AVMService.
Reworked handling of path lookup failures to not throw exceptions internally, to improve performance of certain layered directory operations. Unfortunately there remains at least one scenario, handling of bulk loads, and promotions of deeply nested directories in layered contexts, in which performance is considerably less than ideal. Made AVMService.createBranch() and AVMSyncService.update() perform implicit snapshots of source tree's stores before proceeding. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3812 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -79,6 +79,10 @@ class LayeredFileNodeImpl extends FileNodeImpl implements LayeredFileNode
|
||||
{
|
||||
// LayeredFileNodes are always copied.
|
||||
Lookup lookup = AVMRepository.GetInstance().lookup(-1, fIndirection, false);
|
||||
if (lookup == null)
|
||||
{
|
||||
throw new AVMException("Unbacked layered file node.");
|
||||
}
|
||||
AVMNode indirect = lookup.getCurrentNode();
|
||||
if (indirect.getType() != AVMNodeType.LAYERED_FILE &&
|
||||
indirect.getType() != AVMNodeType.PLAIN_FILE)
|
||||
@@ -250,6 +254,10 @@ class LayeredFileNodeImpl extends FileNodeImpl implements LayeredFileNode
|
||||
public ContentData getContentData(Lookup lPath)
|
||||
{
|
||||
Lookup lookup = lPath.getAVMStore().getAVMRepository().lookup(-1, getIndirection(), false);
|
||||
if (lookup == null)
|
||||
{
|
||||
throw new AVMException("Invalid target.");
|
||||
}
|
||||
AVMNode node = lookup.getCurrentNode();
|
||||
if (!(node instanceof FileNode))
|
||||
{
|
||||
|
Reference in New Issue
Block a user