Package org.infinispan

Examples of org.infinispan.AdvancedCache


  public EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata)
      throws CacheException {
    if ( log.isDebugEnabled() ) {
      log.debug( "Building entity cache region [" + regionName + "]" );
    }
    final AdvancedCache cache = getCache( regionName, ENTITY_KEY, properties );
    final EntityRegionImpl region = new EntityRegionImpl( cache, regionName, metadata, this );
    startRegion( region, regionName );
    return region;
  }
View Full Code Here


  public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties properties, CacheDataDescription metadata)
      throws CacheException {
    if ( log.isDebugEnabled() ) {
      log.debug( "Building natural id cache region [" + regionName + "]" );
    }
    final AdvancedCache cache = getCache( regionName, NATURAL_ID_KEY, properties );
    final NaturalIdRegionImpl region = new NaturalIdRegionImpl( cache, regionName, metadata, this );
    startRegion( region, regionName );
    return region;
  }
View Full Code Here

    // If region name is not default one, lookup a cache for that region name
    if ( !regionName.equals( "org.hibernate.cache.internal.StandardQueryCache" ) ) {
      cacheName = regionName;
    }

    final AdvancedCache cache = getCache( cacheName, QUERY_KEY, properties );
    final QueryResultsRegionImpl region = new QueryResultsRegionImpl( cache, regionName, this );
    startRegion( region, regionName );
    return region;
  }
View Full Code Here

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

      configureTransactionManager( builder, templateCacheName, properties );
      // Define configuration
      manager.defineConfiguration( regionName, builder.build() );
      definedConfigurations.add( regionName );
    }
    final AdvancedCache cache = manager.getCache( regionName ).getAdvancedCache();
    if ( !cache.getStatus().allowInvocations() ) {
      cache.start();
    }
    return createCacheWrapper( cache );
  }
View Full Code Here

   }

   /** {@inheritDoc} */
   public CollectionRegion buildCollectionRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException {
      if (log.isDebugEnabled()) log.debug("Building collection cache region [" + regionName + "]");
      AdvancedCache cache = getCache(regionName, COLLECTION_KEY, properties);
      CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(cache);
      CollectionRegionImpl region = new CollectionRegionImpl(cacheAdapter, regionName, metadata, transactionManager, this);
      startRegion(region, regionName);
      return region;
   }
View Full Code Here

   }

   /** {@inheritDoc} */
   public EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata) throws CacheException {
      if (log.isDebugEnabled()) log.debug("Building entity cache region [" + regionName + "]");
      AdvancedCache cache = getCache(regionName, ENTITY_KEY, properties);
      CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(cache);
      EntityRegionImpl region = new EntityRegionImpl(cacheAdapter, regionName, metadata, transactionManager, this);
      startRegion(region, regionName);
      return region;
   }
View Full Code Here

  public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties properties, CacheDataDescription metadata)
      throws CacheException {
    if ( log.isDebugEnabled() ) {
      log.debug( "Building natural id cache region [" + regionName + "]" );
    }
    AdvancedCache cache = getCache( regionName, NATURAL_ID_KEY, properties );
    CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance( cache );
    NaturalIdRegionImpl region = new NaturalIdRegionImpl(
        cacheAdapter,
        regionName,
        metadata,
View Full Code Here

      String cacheName = typeOverrides.get(QUERY_KEY).getCacheName();
      // If region name is not default one, lookup a cache for that region name
      if (!regionName.equals("org.hibernate.cache.internal.StandardQueryCache"))
         cacheName = regionName;

      AdvancedCache cache = getCache(cacheName, QUERY_KEY, properties);
      CacheAdapter cacheAdapter = CacheAdapterImpl.newInstance(cache);
      QueryResultsRegionImpl region = new QueryResultsRegionImpl(cacheAdapter, regionName, properties, transactionManager, this);
      startRegion(region, regionName);
      return region;
   }
View Full Code Here

    * {@inheritDoc}
    */
   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

TOP

Related Classes of org.infinispan.AdvancedCache

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.