Examples of TimestampsRegionImpl


Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

      AdvancedCache cache, String regionName) {
    if ( Caches.isClustered( cache ) ) {
      return new ClusteredTimestampsRegionImpl( cache, regionName, this );
    }
    else {
      return new TimestampsRegionImpl( cache, regionName, this );
    }
  }
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

    */
   public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties)
            throws CacheException {
      log.debug("Building timestamps cache region [" + regionName + "]");
      String cacheName = typeOverrides.get(TIMESTAMPS_KEY).getCacheName();
      return new TimestampsRegionImpl(manager.getCache(cacheName), regionName, transactionManager);
   }
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

   public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties)
            throws CacheException {
      if (log.isDebugEnabled()) log.debug("Building timestamps cache region [" + regionName + "]");
      Cache cache = getCache(regionName, TIMESTAMPS_KEY, properties);
      CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(cache);
      TimestampsRegionImpl region = new TimestampsRegionImpl(cacheAdapter, regionName, transactionManager, this);
      region.start();
      return region;
   }
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

         assertTrue(factory.getDefinedConfigurations().contains("timestamps"));
         assertTrue(factory.getTypeOverrides().get("timestamps").getCacheName().equals("timestamps"));
         Configuration config = new Configuration();
         config.setFetchInMemoryState(false);
         manager.defineConfiguration("timestamps", config);
         TimestampsRegionImpl region = (TimestampsRegionImpl) factory.buildTimestampsRegion(timestamps, p);
         AdvancedCache cache = region.getCache();
         Configuration cacheCfg = cache.getConfiguration();
         assertEquals(EvictionStrategy.NONE, cacheCfg.getEvictionStrategy());
         assertEquals(CacheMode.REPL_ASYNC, cacheCfg.getCacheMode());
         assertTrue(cacheCfg.isUseLazyDeserialization());
         assertFalse(cacheCfg.isExposeJmxStatistics());
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

         assertTrue(factory.getTypeOverrides().get("timestamps").getCacheName().equals("unrecommended-timestamps"));
         Configuration config = new Configuration();
         config.setFetchInMemoryState(false);
         config.setCacheMode(CacheMode.REPL_SYNC);
         manager.defineConfiguration("unrecommended-timestamps", config);
         TimestampsRegionImpl region = (TimestampsRegionImpl) factory.buildTimestampsRegion(timestamps, p);
         AdvancedCache cache = region.getCache();
         Configuration cacheCfg = cache.getConfiguration();
         assertEquals(EvictionStrategy.NONE, cacheCfg.getEvictionStrategy());
         assertEquals(CacheMode.REPL_SYNC, cacheCfg.getCacheMode());
         assertFalse(cacheCfg.isUseLazyDeserialization());
         assertFalse(cacheCfg.isExposeJmxStatistics());
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

         final String timestamps = "org.hibernate.cache.spi.UpdateTimestampsCache";
         Configuration config = new Configuration();
         config.setFetchInMemoryState(false);
         manager.defineConfiguration("timestamps", config);
         TimestampsRegionImpl timestampsRegion = (TimestampsRegionImpl) factory.buildTimestampsRegion(timestamps, p);
         cache = timestampsRegion.getCache();
         assertTrue(factory.getTypeOverrides().get("timestamps").isExposeStatistics());
         assertTrue(cache.getConfiguration().isExposeJmxStatistics());

         CollectionRegionImpl collectionRegion = (CollectionRegionImpl) factory.buildCollectionRegion("com.acme.Person.addresses", p, null);
         cache = collectionRegion.getCache();
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

         final String timestamps = "org.hibernate.cache.spi.UpdateTimestampsCache";
         Configuration config = new Configuration();
         config.setFetchInMemoryState(false);
         manager.defineConfiguration("timestamps", config);
         TimestampsRegionImpl timestampsRegion = (TimestampsRegionImpl) factory.buildTimestampsRegion(timestamps, p);
         cache = timestampsRegion.getCache();
         assertFalse(factory.getTypeOverrides().get("timestamps").isExposeStatistics());
         assertFalse(cache.getConfiguration().isExposeJmxStatistics());

         CollectionRegionImpl collectionRegion = (CollectionRegionImpl) factory.buildCollectionRegion("com.acme.Person.addresses", p, null);
         cache = collectionRegion.getCache();
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

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

      TimestampsRegionImpl region = (TimestampsRegionImpl) regionFactory.buildTimestampsRegion(getStandardRegionName(REGION_PREFIX), cfg.getProperties());
      TimestampsRegionImpl region2 = (TimestampsRegionImpl) regionFactory2.buildTimestampsRegion(getStandardRegionName(REGION_PREFIX), cfg2.getProperties());
//      QueryResultsRegion region2 = regionFactory2.buildQueryResultsRegion(getStandardRegionName(REGION_PREFIX), cfg2.getProperties());

//      ClassLoader cl = Thread.currentThread().getContextClassLoader();
//      Thread.currentThread().setContextClassLoader(cl.getParent());
//      log.info("TCCL is " + cl.getParent());
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

   public TimestampsRegion buildTimestampsRegion(String regionName, Properties properties)
            throws CacheException {
      if (log.isDebugEnabled()) log.debug("Building timestamps cache region [" + regionName + "]");
      AdvancedCache cache = getCache(regionName, TIMESTAMPS_KEY, properties);
      CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(cache);
      TimestampsRegionImpl region = createTimestampsRegion(cacheAdapter, regionName);
      startRegion(region, regionName);
      return region;
   }
View Full Code Here

Examples of org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl

      startRegion(region, regionName);
      return region;
   }

   protected TimestampsRegionImpl createTimestampsRegion(CacheAdapter cacheAdapter, String regionName) {
      return new TimestampsRegionImpl(cacheAdapter, regionName, transactionManager, this);
   }
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.