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

Examples of fi.foyt.hibernate.gae.search.persistence.dao.DirectoryDAO


public class GaeDirectoryProvider implements DirectoryProvider<GaeDirectory> {

  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


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

    boolean someFailureHappened = false;
    try {
     
      try {
View Full Code Here

  public void initialize(Properties props, WorkerBuildContext context, DirectoryBasedIndexManager indexManager) {
    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

public class ScheduledUtils {

  public static void performWorkList(FullTextEntityManager fullTextEntityManager, WorkList workListEntity) {
    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);
   
View Full Code Here

TOP

Related Classes of fi.foyt.hibernate.gae.search.persistence.dao.DirectoryDAO

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.