mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added getRepository() and getRepositories() to AVMService, removed getRepositoryNames()
from same. These new methods return a RepositoryDescriptor and a List of RepositoryDescriptors. Note, Hibernate mapping has changed. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3207 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -32,7 +32,8 @@ public class SimultaneousLoadTest extends AVMServiceTestBase
|
||||
{
|
||||
try
|
||||
{
|
||||
int n = 4;
|
||||
int n = 2;
|
||||
int m = 1;
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
fService.createDirectory("main:/", "d" + i);
|
||||
@@ -41,7 +42,7 @@ public class SimultaneousLoadTest extends AVMServiceTestBase
|
||||
Thread [] threads = new Thread[n];
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
Loader loader = new Loader("source", "main:/d" + i);
|
||||
Loader loader = new Loader("source", "main:/d" + i, m);
|
||||
threads[i] = new Thread(loader);
|
||||
threads[i].start();
|
||||
}
|
||||
@@ -74,21 +75,31 @@ public class SimultaneousLoadTest extends AVMServiceTestBase
|
||||
*/
|
||||
private String fDestination;
|
||||
|
||||
/**
|
||||
* The number of copies of stuff to make serially.
|
||||
*/
|
||||
private int fCount;
|
||||
|
||||
/**
|
||||
* Set up.
|
||||
* @param source Source directory.
|
||||
* @param destination Destination path.
|
||||
*/
|
||||
public Loader(String source, String destination)
|
||||
public Loader(String source, String destination, int count)
|
||||
{
|
||||
fLoader = new BulkLoader(fService);
|
||||
fSource = source;
|
||||
fDestination = destination;
|
||||
fCount = count;
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
fLoader.recursiveLoad(fSource, fDestination);
|
||||
for (int i = 0; i < fCount; i++)
|
||||
{
|
||||
fService.createDirectory(fDestination, "" + i);
|
||||
fLoader.recursiveLoad(fSource, fDestination + "/" + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user