Package org.hibernate.test.cache.infinispan

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


   @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

  @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

  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

  @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

  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

Related Classes of org.hibernate.test.cache.infinispan.NodeEnvironment

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.