Package org.hibernate.search.store.optimization

Examples of org.hibernate.search.store.optimization.OptimizerStrategy.addTransaction()


    if ( raisedException == null ) {
      for (DirectoryProvider provider : lockedProviders) {
        Workspace.DPStatistics stats = dpStatistics.get( provider );
        if ( !stats.optimizationForced ) {
          OptimizerStrategy optimizerStrategy = searchFactoryImplementor.getOptimizerStrategy( provider );
          optimizerStrategy.addTransaction( stats.operations );
          try {
            optimizerStrategy.optimize( this );
          }
          catch (SearchException e) {
            raisedException = new SearchException( "Exception while optimizing directoryProvider: "
View Full Code Here


    //then for remaining DirectoryProvider
    for ( DPWorkspace space : directorySpace.values() ) {
      if ( space.needsOptimization() ) {
        if ( raisedException == null ) {//avoid optimizations in case of errors or exceptions
          OptimizerStrategy optimizerStrategy = space.getOptimizerStrategy();
          optimizerStrategy.addTransaction( space.countOperations() );
          try {
            optimizerStrategy.optimize( this );
          }
          catch (SearchException e) {
            //this will also cause skipping other optimizations:
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.