@Test public void instantiateReturnsAsynchronous() { final EvaluationConfiguration config = new EvaluationConfiguration(true, false, 4); final EvaluationManager test = EvaluationManagerFactory.instantiateEvaluationManager(config, platform, persistenceManager, templateManager, fields, versions, versionTimestamp); assertNotNull(test); assertTrue(test instanceof AsynchronousEvaluationManager); }
public static EvaluationManager instantiateEvaluationManager( final EvaluationConfiguration evaluationConfiguration, final SearchPlatform searchPlatform, final PersistenceManager persistenceManager, final QueryTemplateManager templateManager, final String[] fields, final Collection<String> versions, final String versionTimestamp) { final EvaluationManager evaluationManager; if (evaluationConfiguration.isRunAsync()) { if (evaluationConfiguration.isRunQueriesAsync()) { evaluationManager = new AsynchronousQueryEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } else { evaluationManager = new AsynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } } else { evaluationManager = new SynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp); } return evaluationManager; }
EvaluationManagerFactory { public static EvaluationManager instantiateEvaluationManager( final EvaluationConfiguration evaluationConfiguration, final SearchPlatform searchPlatform, final PersistenceManager persistenceManager, final QueryTemplateManager templateManager, final String[] fields, final Collection<String> versions, final String versionTimestamp) { final EvaluationManager evaluationManager; if (evaluationConfiguration.isRunAsync()) { if (evaluationConfiguration.isRunQueriesAsync()) { evaluationManager = new AsynchronousQueryEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } else { evaluationManager = new AsynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } } else { evaluationManager = new SynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp); } return evaluationManager; } }
EvaluationManagerFactory { public static EvaluationManager instantiateEvaluationManager( final EvaluationConfiguration evaluationConfiguration, final SearchPlatform searchPlatform, final PersistenceManager persistenceManager, final QueryTemplateManager templateManager, final String[] fields, final Collection<String> versions, final String versionTimestamp) { final EvaluationManager evaluationManager; if (evaluationConfiguration.isRunAsync()) { if (evaluationConfiguration.isRunQueriesAsync()) { evaluationManager = new AsynchronousQueryEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } else { evaluationManager = new AsynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } } else { evaluationManager = new SynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp); } return evaluationManager; }  }
EvaluationManagerFactory { public static EvaluationManager instantiateEvaluationManager( final EvaluationConfiguration evaluationConfiguration, final SearchPlatform searchPlatform, final PersistenceManager persistenceManager, final QueryTemplateManager templateManager, final String[] fields, final Collection<String> versions, final String versionTimestamp) { final EvaluationManager evaluationManager; if (evaluationConfiguration.isRunAsync()) { if (evaluationConfiguration.isRunQueriesAsync()) { evaluationManager = new AsynchronousQueryEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } else { evaluationManager = new AsynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } } else { evaluationManager = new SynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp); } return evaluationManager; }  static EvaluationManager instantiateEvaluationManager(
            final EvaluationConfiguration evaluationConfiguration,
            final SearchPlatform searchPlatform,
            final PersistenceManager persistenceManager,
            final QueryTemplateManager templateManager,
            final String[] fields,
            final Collection<String> versions,
            final String versionTimestamp); }
EvaluationManagerFactory { public static EvaluationManager instantiateEvaluationManager( final EvaluationConfiguration evaluationConfiguration, final SearchPlatform searchPlatform, final PersistenceManager persistenceManager, final QueryTemplateManager templateManager, final String[] fields, final Collection<String> versions, final String versionTimestamp) { final EvaluationManager evaluationManager; if (evaluationConfiguration.isRunAsync()) { if (evaluationConfiguration.isRunQueriesAsync()) { evaluationManager = new AsynchronousQueryEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } else { evaluationManager = new AsynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp, evaluationConfiguration.getThreadpoolSize()); } } else { evaluationManager = new SynchronousEvaluationManager(searchPlatform, templateManager, persistenceManager, fields, versions, versionTimestamp); } return evaluationManager; }  static EvaluationManager instantiateEvaluationManager(
            final EvaluationConfiguration evaluationConfiguration,
            final SearchPlatform searchPlatform,
            final PersistenceManager persistenceManager,
            final QueryTemplateManager templateManager,
            final String[] fields,
            final Collection<String> versions,
            final String versionTimestamp);  }