Package fi.foyt.hibernate.gae.search.persistence.domainmodel

Examples of fi.foyt.hibernate.gae.search.persistence.domainmodel.Directory


  public void initialize(String directoryProviderName, Properties properties, BuildContext context) {
    this.indexName = directoryProviderName;

    DirectoryDAO directoryDAO = new DirectoryDAO();
    Directory dir = directoryDAO.findByName(this.indexName);
    if (dir == null) {
      dir = directoryDAO.create(indexName);
    }

    this.directory = new GaeDirectory(dir);
View Full Code Here


    LuceneWorkSerializer serializer = indexManager.getSerializer();
   
    DirectoryDAO directoryDAO = new DirectoryDAO();
    WorkListDAO workListDAO = new WorkListDAO();
   
    Directory directory = directoryDAO.findByName(indexManager.getIndexName());

    boolean someFailureHappened = false;
    try {
     
      try {
        workListDAO.create(directory, serializer.toSerializedModel(workList));
        LOG.info("Scheduled " + workList.size() + " works in " + directory.getName() + " directory to be performed in future");
      } catch (Exception e) {
        someFailureHappened = true;
        errorContextBuilder.errorThatOccurred(e.getCause());
      }
     
View Full Code Here

  public DirectoryDAO() {
    super("DIRECTORY", true);
  }

  public Directory create(String name) {
    Directory directory = new Directory();
    directory.setName(name);
    return (Directory) persist(directory);
  }
View Full Code Here

    this.workspace = new GaeInstantWorkspace(indexManager, context, props);
    this.visitor = new LuceneWorkVisitor(workspace);
    this.errorHandler = context.getErrorHandler();

    DirectoryDAO directoryDAO = new DirectoryDAO();
    Directory directory = directoryDAO.findByName(indexManager.getIndexName());
    readLock = new LockImpl(directory, "backendLock.parallelModificationLock");
    writeLock = new LockImpl(directory, "backendLock.exclusiveWriteLock");
  }
View Full Code Here

    WorkListDAO workListDAO = new WorkListDAO();
    DirectoryDAO directoryDAO = new DirectoryDAO();

    SearchFactory searchFactory = fullTextEntityManager.getSearchFactory();
   
    Directory directory = directoryDAO.findByKey(workListEntity.getKey().getParent());
   
    IndexManager indexManager = getIndexManager(searchFactory, directory.getName());
    LuceneWorkSerializer serializer = indexManager.getSerializer();
    BackendQueueProcessor queueProcessor = createInstanceBackendQueueProcessor(searchFactory, indexManager);
   
    List<LuceneWork> luceneWorks = serializer.toLuceneWorks(workListEntity.getData());
   
View Full Code Here

TOP

Related Classes of fi.foyt.hibernate.gae.search.persistence.domainmodel.Directory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.