Examples of NodeEnvironment


Examples of org.elasticsearch.env.NodeEnvironment

        // create the environment based on the finalized (processed) view of the settings
        this.environment = new Environment(this.settings());

        CompressorFactory.configure(settings);

        NodeEnvironment nodeEnvironment = new NodeEnvironment(this.settings, this.environment);

        boolean success = false;
        try {
            ModulesBuilder modules = new ModulesBuilder();
            modules.add(new Version.Module(version));
            modules.add(new PageCacheRecyclerModule(settings));
            modules.add(new CircuitBreakerModule(settings));
            modules.add(new BigArraysModule(settings));
            modules.add(new PluginsModule(settings, pluginsService));
            modules.add(new SettingsModule(settings));
            modules.add(new NodeModule(this));
            modules.add(new NetworkModule());
            modules.add(new ScriptModule(settings));
            modules.add(new EnvironmentModule(environment));
            modules.add(new NodeEnvironmentModule(nodeEnvironment));
            modules.add(new ClusterNameModule(settings));
            modules.add(new ThreadPoolModule(settings));
            modules.add(new DiscoveryModule(settings));
            modules.add(new ClusterModule(settings));
            modules.add(new RestModule(settings));
            modules.add(new TransportModule(settings));
            if (settings.getAsBoolean(HTTP_ENABLED, true)) {
                modules.add(new HttpServerModule(settings));
            }
            modules.add(new RiversModule(settings));
            modules.add(new IndicesModule(settings));
            modules.add(new SearchModule());
            modules.add(new ActionModule(false));
            modules.add(new MonitorModule(settings));
            modules.add(new GatewayModule(settings));
            modules.add(new NodeClientModule());
            modules.add(new ShapeModule());
            modules.add(new PercolatorModule());
            modules.add(new ResourceWatcherModule());
            modules.add(new RepositoriesModule());
            modules.add(new TribeModule());
            modules.add(new BenchmarkModule(settings));

            injector = modules.createInjector();

            client = injector.getInstance(Client.class);
            success = true;
        } finally {
            if (!success) {
                nodeEnvironment.close();
            }
        }

        logger.info("initialized");
    }
View Full Code Here

Examples of org.hibernate.test.cache.infinispan.NodeEnvironment

  @Before
  public void prepareResources() throws Exception {
    // to mimic exactly the old code results, both environments here are exactly the same...
    Configuration cfg = createConfiguration( getConfigurationName() );
    localEnvironment = new NodeEnvironment( cfg );
    localEnvironment.prepare();

    localCollectionRegion = localEnvironment.getCollectionRegion( REGION_NAME, getCacheDataDescription() );
    localAccessStrategy = localCollectionRegion.buildAccessStrategy( getAccessType() );

    invalidation = Caches.isInvalidationCache(localCollectionRegion.getCache());
    synchronous = Caches.isSynchronousCache(localCollectionRegion.getCache());

    // Sleep a bit to avoid concurrent FLUSH problem
    avoidConcurrentFlush();

    remoteEnvironment = new NodeEnvironment( cfg );
    remoteEnvironment.prepare();

    remoteCollectionRegion = remoteEnvironment.getCollectionRegion( REGION_NAME, getCacheDataDescription() );
    remoteAccessStrategy = remoteCollectionRegion.buildAccessStrategy( getAccessType() );
  }
View Full Code Here

Examples of org.hibernate.test.cache.infinispan.NodeEnvironment

   @Before
   public void prepareResources() throws Exception {
      // to mimic exactly the old code results, both environments here are exactly the same...
      Configuration cfg = createConfiguration(getConfigurationName());
      localEnvironment = new NodeEnvironment(cfg);
      localEnvironment.prepare();

      localEntityRegion = localEnvironment.getEntityRegion(REGION_NAME, getCacheDataDescription());
      localAccessStrategy = localEntityRegion.buildAccessStrategy(getAccessType());

      invalidation = Caches.isInvalidationCache(localEntityRegion.getCache());
      synchronous = Caches.isSynchronousCache(localEntityRegion.getCache());

      // Sleep a bit to avoid concurrent FLUSH problem
      avoidConcurrentFlush();

      remoteEnvironment = new NodeEnvironment(cfg);
      remoteEnvironment.prepare();

      remoteEntityRegion = remoteEnvironment.getEntityRegion(REGION_NAME, getCacheDataDescription());
      remoteAccessStrategy = remoteEntityRegion.buildAccessStrategy(getAccessType());
View Full Code Here

Examples of org.hibernate.test.cache.infinispan.NodeEnvironment

  @Before
  public void prepareResources() throws Exception {
    // to mimic exactly the old code results, both environments here are exactly the same...
    Configuration cfg = createConfiguration( getConfigurationName() );
    localEnvironment = new NodeEnvironment( cfg );
    localEnvironment.prepare();

    localEntityRegion = localEnvironment.getEntityRegion( REGION_NAME, getCacheDataDescription() );
    localAccessStrategy = localEntityRegion.buildAccessStrategy( getAccessType() );

    invalidation = Caches.isInvalidationCache(localEntityRegion.getCache());
    synchronous = Caches.isSynchronousCache(localEntityRegion.getCache());

    // Sleep a bit to avoid concurrent FLUSH problem
    avoidConcurrentFlush();

    remoteEnvironment = new NodeEnvironment( cfg );
    remoteEnvironment.prepare();

    remoteEntityRegion = remoteEnvironment.getEntityRegion( REGION_NAME, getCacheDataDescription() );
    remoteAccessStrategy = remoteEntityRegion.buildAccessStrategy( getAccessType() );
View Full Code Here

Examples of org.hibernate.test.cache.infinispan.NodeEnvironment

  private NodeEnvironment environment;
  private EntityRegionAccessStrategy accessStrategy;

  @Before
  public final void prepareLocalAccessStrategy() throws Exception {
    environment = new NodeEnvironment( createConfiguration() );
    environment.prepare();

    // Sleep a bit to avoid concurrent FLUSH problem
    avoidConcurrentFlush();
View Full Code Here

Examples of org.hibernate.test.cache.infinispan.NodeEnvironment

  @Before
  public void prepareResources() throws Exception {
    // to mimic exactly the old code results, both environments here are exactly the same...
    Configuration cfg = createConfiguration( getConfigurationName() );
    localEnvironment = new NodeEnvironment( cfg );
    localEnvironment.prepare();

    localCollectionRegion = localEnvironment.getCollectionRegion( REGION_NAME, getCacheDataDescription() );
    localAccessStrategy = localCollectionRegion.buildAccessStrategy( getAccessType() );

    invalidation = Caches.isInvalidationCache(localCollectionRegion.getCache());
    synchronous = Caches.isSynchronousCache(localCollectionRegion.getCache());

    // Sleep a bit to avoid concurrent FLUSH problem
    avoidConcurrentFlush();

    remoteEnvironment = new NodeEnvironment( cfg );
    remoteEnvironment.prepare();

    remoteCollectionRegion = remoteEnvironment.getCollectionRegion( REGION_NAME, getCacheDataDescription() );
    remoteAccessStrategy = remoteCollectionRegion.buildAccessStrategy( getAccessType() );
  }
View Full Code Here

Examples of org.hibernate.test.cache.infinispan.NodeEnvironment

  private NodeEnvironment environment;
  private static CollectionRegionAccessStrategy accessStrategy;

  @Before
  public final void prepareLocalAccessStrategy() throws Exception {
    environment = new NodeEnvironment( createConfiguration() );
    environment.prepare();

    // Sleep a bit to avoid concurrent FLUSH problem
    avoidConcurrentFlush();
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.