org.exoplatform.wcm.benchmark.preparation.repository
Class RepoloadServiceImpl

java.lang.Object
  extended by org.exoplatform.wcm.benchmark.preparation.repository.RepoloadServiceImpl
All Implemented Interfaces:
org.picocontainer.Startable

public class RepoloadServiceImpl
extends java.lang.Object
implements org.picocontainer.Startable

Repository Loader for CTI This loader builds a tree of 4 levels. All trees starting in the first level are created using Threads.

Author:
Brice.Revenant@exoplatform.com

Field Summary
protected  int fileSize
          The file size.
protected  int firstWord
          The first word.
protected  int l1Count
          The l1 count.
protected  int l2Count
          The l2 count.
protected  int l3Count
          The l3 count.
protected  int l4Count
          The l4 count.
protected  org.apache.commons.logging.Log log
          The log.
protected  java.lang.String mimeType
          The mime type.
protected  java.lang.String repository
          The repository.
protected  org.exoplatform.services.jcr.RepositoryService repositoryService
          The repository service.
protected  java.lang.String root
          The root.
protected  javax.jcr.Node rootNode
          The root node.
protected  int secondWord
          The second word.
protected  int startIndex
          The start index.
protected  java.lang.String workspace
          The workspace.
 
Constructor Summary
RepoloadServiceImpl(org.exoplatform.container.xml.InitParams params, org.exoplatform.services.jcr.RepositoryService repositoryService)
          Constructor Initializes the service.
RepoloadServiceImpl(int fSize, int l1Count, int l2Count, int l3Count, int l4Count, java.lang.String mimeType, java.lang.String repository, java.lang.String root, java.lang.String workspace, org.exoplatform.services.jcr.RepositoryService repositoryService, int firstWord, int secondWord, int startIndex, int spetialTitlesCount)
          Constructor Initializes the service.
 
Method Summary
 void createRootTree()
          Create the root node of the tree.
 javax.jcr.Node getRootNode()
          Gets the root node.
 boolean[] parseBitMap(int documents, int titles)
          Parses the bit map.
 void start()
          Triggers the load.
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log
The log.


repositoryService

protected org.exoplatform.services.jcr.RepositoryService repositoryService
The repository service.


rootNode

protected javax.jcr.Node rootNode
The root node.


fileSize

protected int fileSize
The file size.


l1Count

protected int l1Count
The l1 count.


l2Count

protected int l2Count
The l2 count.


l3Count

protected int l3Count
The l3 count.


l4Count

protected int l4Count
The l4 count.


mimeType

protected java.lang.String mimeType
The mime type.


repository

protected java.lang.String repository
The repository.


root

protected java.lang.String root
The root.


workspace

protected java.lang.String workspace
The workspace.


firstWord

protected int firstWord
The first word.


secondWord

protected int secondWord
The second word.


startIndex

protected int startIndex
The start index.

Constructor Detail

RepoloadServiceImpl

public RepoloadServiceImpl(org.exoplatform.container.xml.InitParams params,
                           org.exoplatform.services.jcr.RepositoryService repositoryService)
Constructor Initializes the service.

Parameters:
params - the params
repositoryService - the repository service

RepoloadServiceImpl

public RepoloadServiceImpl(int fSize,
                           int l1Count,
                           int l2Count,
                           int l3Count,
                           int l4Count,
                           java.lang.String mimeType,
                           java.lang.String repository,
                           java.lang.String root,
                           java.lang.String workspace,
                           org.exoplatform.services.jcr.RepositoryService repositoryService,
                           int firstWord,
                           int secondWord,
                           int startIndex,
                           int spetialTitlesCount)
Constructor Initializes the service.

Parameters:
fSize - the f size
l1Count - the l1 count
l2Count - the l2 count
l3Count - the l3 count
l4Count - the l4 count
mimeType - the mime type
repository - the repository
root - the root
workspace - the workspace
repositoryService - the repository service
firstWord - the first word
secondWord - the second word
startIndex - the start index
spetialTitlesCount - the spetial titles count
Method Detail

createRootTree

public void createRootTree()
Create the root node of the tree.


start

public void start()
Triggers the load.

Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable

parseBitMap

public boolean[] parseBitMap(int documents,
                             int titles)
Parses the bit map.

Parameters:
documents - the documents
titles - the titles
Returns:
the boolean[]

getRootNode

public javax.jcr.Node getRootNode()
Gets the root node.

Returns:
the root node


Copyright © 2010 eXo Platform SAS. All Rights Reserved.