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:
Britt Park
2006-09-17 20:05:27 +00:00
parent f5e509c18b
commit 90d171b913
11 changed files with 545 additions and 181 deletions

View File

@@ -192,15 +192,6 @@ public interface AVMService
*/
public void createDirectory(String path, String name);
/**
* Create a new directory, in an already copy on written node.
* This should only be used if you really know what you're doing.
* @param parent The parent node.
* @param name The name of the new directory.
* @return A descriptor for the newly created directory.
*/
public AVMNodeDescriptor createDirectory(AVMNodeDescriptor parent, String name);
/**
* Create a new layered file.
* @param targetPath The simple absolute path that the new file will point at.
@@ -695,28 +686,6 @@ public interface AVMService
*/
public void link(String parentPath, String name, AVMNodeDescriptor toLink);
/**
* This is a more dangerous version of link, which assumes
* that copy on write has occurred for the parent node. This is
* an internal call. Don't use it if you don't know precisely
* what you are doing.
* @param parent The parent node.
* @param name The name to give the child.
* @param child The child node to link.
*/
public void link(AVMNodeDescriptor parent, String name, AVMNodeDescriptor child);
/**
* Flatten a direct child of a layered directory. This does
* the equivalent of removing the given child from the directory
* and then doing an uncover. This routine makes many dangerous
* assumptions and is only for use by AVMSyncService. Don't use it
* if you don't know precisely what you are doing.
* @param lDir The layered directory node.
* @param name The name to flatten.
*/
public void flatten(AVMNodeDescriptor lDir, String name);
/**
* Force copy on write of a path.
* @param path The path to force.