Package org.hibernate.search.backend

Examples of org.hibernate.search.backend.PurgeAllLuceneWork


    else if ( workType == WorkType.DELETE || workType == WorkType.PURGE ) {
      String idInString = idBridge.objectToString( id );
      queue.add( new DeleteLuceneWork( id, idInString, entityClass ) );
    }
    else if ( workType == WorkType.PURGE_ALL ) {
      queue.add( new PurgeAllLuceneWork( entityClass ) );
    }
    else if ( workType == WorkType.UPDATE || workType == WorkType.COLLECTION ) {
      String idInString = idBridge.objectToString( id );
      queue.add( new DeleteLuceneWork( id, idInString, entityClass ) );
      queue.add( createAddWork( entityClass, entity, id, idInString, false ) );
View Full Code Here


     */
    public void enqueueLuceneWork(List<LuceneWork> luceneQueue) {
      final Set<Entry<Serializable, PerEntityWork<T>>> entityInstances = entityById.entrySet();
      ConversionContext conversionContext = new ContextualExceptionBridgeHelper();
      if ( purgeAll ) {
        luceneQueue.add( new PurgeAllLuceneWork( entityClass ) );
      }
      for ( Entry<Serializable, PerEntityWork<T>> entry : entityInstances ) {
        Serializable indexingId = entry.getKey();
        PerEntityWork<T> perEntityWork = entry.getValue();
        perEntityWork.enqueueLuceneWork( entityClass, indexingId, documentBuilder, luceneQueue, conversionContext );
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class.getClassLoader(),
        "entity class"
    );
    results.add( new PurgeAllLuceneWork( entityClass ) );
  }
View Full Code Here

    if ( this.purgeAtStart ) {
      //purgeAll for affected entities
      Set<Class<?>> targetedClasses = searchFactoryImplementor.getIndexedTypesPolymorphic( rootEntities );
      for ( Class<?> clazz : targetedClasses ) {
        //needs do be in-sync work to make sure we wait for the end of it.
        backend.doWorkInSync( new PurgeAllLuceneWork( clazz ) );
      }
      if ( this.optimizeAfterPurge ) {
        optimize( targetedClasses );
      }
    }
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        LuceneWorkHydrator.class,
        "entity class"
    );
    results.add( new PurgeAllLuceneWork( entityClass ) );
  }
View Full Code Here

     * @param luceneQueue work will be appended to this list
     */
    public void enqueueLuceneWork(List<LuceneWork> luceneQueue) {
      final Set<Entry<Serializable, PerEntityWork<T>>> entityInstances = entityById.entrySet();
      if ( purgeAll ) {
        luceneQueue.add( new PurgeAllLuceneWork( entityClass ) );
      }
      for ( Entry<Serializable, PerEntityWork<T>> entry : entityInstances ) {
        Serializable indexingId = entry.getKey();
        PerEntityWork<T> perEntityWork = entry.getValue();
        perEntityWork.enqueueLuceneWork( entityClass, indexingId, documentBuilder, luceneQueue );
View Full Code Here

    else if ( workType == WorkType.DELETE || workType == WorkType.PURGE ) {
      String idInString = objectToString(idBridge, idKeywordName, id);
      queue.add( new DeleteLuceneWork( id, idInString, entityClass ) );
    }
    else if ( workType == WorkType.PURGE_ALL ) {
      queue.add( new PurgeAllLuceneWork( entityClass ) );
    }
    else if ( workType == WorkType.UPDATE || workType == WorkType.COLLECTION ) {
      String idInString = objectToString(idBridge, idKeywordName, id);
      queue.add( new DeleteLuceneWork( id, idInString, entityClass ) );
      queue.add( createAddWork( entityClass, entity, id, idInString, false ) );
View Full Code Here

    Class<?> entityClass = ClassLoaderHelper.classForName(
        entityClassName,
        "entity class",
        searchFactory.getServiceManager()
    );
    results.add( new PurgeAllLuceneWork( entityClass ) );
  }
View Full Code Here

TOP

Related Classes of org.hibernate.search.backend.PurgeAllLuceneWork

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.