Examples of performOperations()


Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

      if ( indexManager == null ) {
        log.messageReceivedForUndefinedIndex( indexName );
        return;
      }
      queue = indexManager.getSerializer().toLuceneWorks( (byte[]) objectMessage.getObject() );
      indexManager.performOperations( queue, null );
    }
    catch (JMSException e) {
      log.unableToRetrieveObjectFromMessage( message.getClass(), e );
      return;
    }
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

      if (indexManager == null) {
         throw new SearchException("Unknown index referenced : " + indexName);
      }
      List<LuceneWork> luceneWorks = indexManager.getSerializer().toLuceneWorks(this.serializedModel);
      List<LuceneWork> workToApply = transformKeysToStrings(luceneWorks);//idInString field is not serialized, we need to extract it from the key object
      indexManager.performOperations(workToApply, null);
      return Boolean.TRUE; //Return value to be ignored
   }

   private List<LuceneWork> transformKeysToStrings(final List<LuceneWork> luceneWorks) {
      final KeyTransformationHandler keyTransformationHandler = queryInterceptor.getKeyTransformationHandler();
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

    List<LuceneWork> queue = new ArrayList<LuceneWork>();
    queue.add( new HarmlessWork( "firstWork" ) );
    queue.add( new HarmlessWork( "secondWork" ) );
    WORK_COUNTER.set( 0 ); // reset work counter
    indexManager.performOperations( queue, null );
    Assert.assertEquals( 2, WORK_COUNTER.get() );

    WORK_COUNTER.set( 0 ); // reset work counter
    final FailingWork firstFailure = new FailingWork( "firstFailure" );
    queue.add( firstFailure );
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

    queue.add( firstFailure );
    final HarmlessWork thirdWork = new HarmlessWork( "thirdWork" );
    queue.add( thirdWork );
    final HarmlessWork fourthWork = new HarmlessWork( "fourthWork" );
    queue.add( fourthWork );
    indexManager.performOperations( queue, null );
    Assert.assertEquals( 4, WORK_COUNTER.get() );

    String errorMessage = mockErrorHandler.getErrorMessage();
    Throwable exception = mockErrorHandler.getLastException();
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

      if ( indexManager == null ) {
        log.messageReceivedForUndefinedIndex( indexName );
        return;
      }
      queue = indexManager.getSerializer().toLuceneWorks( (byte[]) objectMessage.getObject() );
      indexManager.performOperations( queue, null );
    }
    catch (JMSException e) {
      log.unableToRetrieveObjectFromMessage( message.getClass(), e );
      return;
    }
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

      if (indexManager == null) {
         throw new SearchException("Unknown index referenced");
      }
      List<LuceneWork> luceneWorks = indexManager.getSerializer().toLuceneWorks(this.serializedModel);
      List<LuceneWork> workToApply = transformKeysToStrings(luceneWorks);//idInString field is not serialized, we need to extract it from the key object
      indexManager.performOperations(workToApply, null);
      return Boolean.TRUE; //Return value to be ignored
   }

   private List<LuceneWork> transformKeysToStrings(final List<LuceneWork> luceneWorks) {
      final KeyTransformationHandler keyTransformationHandler = queryInterceptor.getKeyTransformationHandler();
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

      if ( indexManager == null ) {
        log.messageReceivedForUndefinedIndex( indexName );
        return;
      }
      queue = indexManager.getSerializer().toLuceneWorks( (byte[]) objectMessage.getObject() );
      indexManager.performOperations( queue, null );
    }
    catch (JMSException e) {
      log.unableToRetrieveObjectFromMessage( message.getClass(), e );
      return;
    }
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

  }

  private void perform(String indexName, List<LuceneWork> queue) {
    IndexManagerHolder allIndexesManager = searchFactory.getAllIndexesManager();
    IndexManager indexManager = allIndexesManager.getIndexManager( indexName );
    indexManager.performOperations( queue, null );
  }

  // ------------------------------------------------------------------------------------------------------------------
  // Implementations of JGroups interfaces
  // ------------------------------------------------------------------------------------------------------------------
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

      if (indexManager == null) {
         throw new SearchException("Unknown index referenced : " + indexName);
      }
      List<LuceneWork> luceneWorks = indexManager.getSerializer().toLuceneWorks(this.serializedModel);
      List<LuceneWork> workToApply = transformKeysToStrings(luceneWorks);//idInString field is not serialized, we need to extract it from the key object
      indexManager.performOperations(workToApply, null);
      return Boolean.TRUE; //Return value to be ignored
   }

   @Override
   public byte getCommandId() {
View Full Code Here

Examples of org.hibernate.search.indexes.spi.IndexManager.performOperations()

  }

  private void perform(String indexName, List<LuceneWork> queue) {
    IndexManagerHolder allIndexesManager = searchFactory.getAllIndexesManager();
    IndexManager indexManager = allIndexesManager.getIndexManager( indexName );
    indexManager.performOperations( queue );
  }

  // ------------------------------------------------------------------------------------------------------------------
  // Implementations of JGroups interfaces
  // ------------------------------------------------------------------------------------------------------------------
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.