类org.hibernate.cache.spi.CacheDataDescription源码实例Demo

下面列出了怎么用org.hibernate.cache.spi.CacheDataDescription的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: redisson   文件: BaseRegion.java
public BaseRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Properties properties, String defaultKey) {
    super();
    this.mapCache = mapCache;
    this.regionFactory = regionFactory;
    this.metadata = metadata;
    this.connectionManager = connectionManager;
    
    String maxEntries = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_ENTRIES_SUFFIX);
    if (maxEntries != null) {
        mapCache.setMaxSize(Integer.valueOf(maxEntries));
    }
    String timeToLive = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.TTL_SUFFIX);
    if (timeToLive != null) {
        ttl = Integer.valueOf(timeToLive);
    }
    String maxIdleTime = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_IDLE_SUFFIX);
    if (maxIdleTime != null) {
        maxIdle = Integer.valueOf(maxIdleTime);
    }

    String fallbackValue = (String) properties.getOrDefault(RedissonRegionFactory.FALLBACK, "false");
    fallback = Boolean.valueOf(fallbackValue);
}
 
源代码2 项目: redisson   文件: BaseRegion.java
public BaseRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Properties properties, String defaultKey) {
    super();
    this.mapCache = mapCache;
    this.regionFactory = regionFactory;
    this.metadata = metadata;
    this.connectionManager = connectionManager;
    
    String maxEntries = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_ENTRIES_SUFFIX);
    if (maxEntries != null) {
        mapCache.setMaxSize(Integer.valueOf(maxEntries));
    }
    String timeToLive = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.TTL_SUFFIX);
    if (timeToLive != null) {
        ttl = Integer.valueOf(timeToLive);
    }
    String maxIdleTime = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_IDLE_SUFFIX);
    if (maxIdleTime != null) {
        maxIdle = Integer.valueOf(maxIdleTime);
    }

    String fallbackValue = (String) properties.getOrDefault(RedissonRegionFactory.FALLBACK, "false");
    fallback = Boolean.valueOf(fallbackValue);
}
 
源代码3 项目: redisson   文件: BaseRegion.java
public BaseRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Properties properties, String defaultKey) {
    super();
    this.mapCache = mapCache;
    this.regionFactory = regionFactory;
    this.metadata = metadata;
    this.connectionManager = connectionManager;
    
    String maxEntries = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_ENTRIES_SUFFIX);
    if (maxEntries != null) {
        mapCache.setMaxSize(Integer.valueOf(maxEntries));
    }
    String timeToLive = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.TTL_SUFFIX);
    if (timeToLive != null) {
        ttl = Integer.valueOf(timeToLive);
    }
    String maxIdleTime = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_IDLE_SUFFIX);
    if (maxIdleTime != null) {
        maxIdle = Integer.valueOf(maxIdleTime);
    }

    String fallbackValue = (String) properties.getOrDefault(RedissonRegionFactory.FALLBACK, "false");
    fallback = Boolean.valueOf(fallbackValue);
}
 
源代码4 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public EntityRegion buildEntityRegion(String regionName, Properties props, CacheDataDescription metadata)
    throws CacheException {
    return new HibernateEntityRegion(this,
        regionName,
        accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName),
        metadata);
}
 
源代码5 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties props,
                                                      CacheDataDescription metadata) throws CacheException {
    return new HibernateNaturalIdRegion(this,
        regionName,
        accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName),
        metadata);
}
 
源代码6 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public CollectionRegion buildCollectionRegion(String regionName, Properties props,
                                                        CacheDataDescription metadata) throws CacheException {
    return new HibernateCollectionRegion(this,
        regionName,
        accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName),
        metadata);
}
 
源代码7 项目: ignite   文件: HibernateNaturalIdRegion.java
/**
 * @param factory Region factory.
 * @param name Region name.
 * @param ignite Grid.
 * @param cache Region cache,
 * @param dataDesc Region data description.
 */
HibernateNaturalIdRegion(HibernateRegionFactory factory,
    String name,
    Ignite ignite,
    HibernateCacheProxy cache,
    CacheDataDescription dataDesc) {
    super(factory, name, ignite, cache, dataDesc);
}
 
源代码8 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public EntityRegion buildEntityRegion(String regionName, Properties props, CacheDataDescription metadata)
    throws CacheException {
    return new HibernateEntityRegion(this,
        regionName,
        accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName),
        metadata);
}
 
源代码9 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties props,
    CacheDataDescription metadata) throws CacheException {
    return new HibernateNaturalIdRegion(this,
        regionName,
        accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName),
        metadata);
}
 
源代码10 项目: ignite   文件: HibernateRegionFactory.java
/** {@inheritDoc} */
@Override public CollectionRegion buildCollectionRegion(String regionName, Properties props,
    CacheDataDescription metadata) throws CacheException {
    return new HibernateCollectionRegion(this,
        regionName,
        accessStgyFactory.node(),
        accessStgyFactory.regionCache(regionName),
        metadata);
}
 
源代码11 项目: redisson   文件: RedissonRegionFactory.java
@Override
public EntityRegion buildEntityRegion(String regionName, Properties properties, CacheDataDescription metadata)
        throws CacheException {
    log.debug("Building entity cache region: " + regionName);

    RMapCache<Object, Object> mapCache = getCache(regionName, properties, ENTITY_DEF);
    return new RedissonEntityRegion(mapCache, ((Redisson)redisson).getConnectionManager(),this, metadata, settings, properties, ENTITY_DEF);
}
 
源代码12 项目: redisson   文件: RedissonRegionFactory.java
@Override
public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties properties, CacheDataDescription metadata)
        throws CacheException {
    log.debug("Building naturalId cache region: " + regionName);
    
    RMapCache<Object, Object> mapCache = getCache(regionName, properties, NATURAL_ID_DEF);
    return new RedissonNaturalIdRegion(mapCache, ((Redisson)redisson).getConnectionManager(),this, metadata, settings, properties, NATURAL_ID_DEF);
}
 
源代码13 项目: redisson   文件: RedissonRegionFactory.java
@Override
public CollectionRegion buildCollectionRegion(String regionName, Properties properties,
        CacheDataDescription metadata) throws CacheException {
    log.debug("Building collection cache region: " + regionName);
    
    RMapCache<Object, Object> mapCache = getCache(regionName, properties, COLLECTION_DEF);
    return new RedissonCollectionRegion(mapCache, ((Redisson)redisson).getConnectionManager(),this, metadata, settings, properties, COLLECTION_DEF);
}
 
源代码14 项目: hibernate4-memcached   文件: MemcachedRegion.java
public MemcachedRegion(CacheNamespace cacheNamespace, OverridableReadOnlyProperties properties, CacheDataDescription metadata, Settings settings,
                       MemcachedAdapter memcachedAdapter, HibernateCacheTimestamper hibernateCacheTimestamper) {
    this.cacheNamespace = cacheNamespace;
    this.properties = properties;
    this.metadata = metadata;
    this.settings = settings;
    this.memcachedAdapter = memcachedAdapter;
    this.hibernateCacheTimestamper = hibernateCacheTimestamper;
}
 
public NaturalIdMemcachedRegion(String regionName, OverridableReadOnlyProperties properties,
                                CacheDataDescription metadata, Settings settings,
                                MemcachedAdapter memcachedAdapter,
                                HibernateCacheTimestamper hibernateCacheTimestamper) {
    super(new CacheNamespace(regionName, true), properties, metadata, settings, memcachedAdapter,
          hibernateCacheTimestamper);
}
 
public RefineKeyOverridedGeneralDataMemcachedRegion(CacheNamespace cacheNamespace,
                                                    OverridableReadOnlyProperties properties,
                                                    CacheDataDescription metadata, Settings settings,
                                                    MemcachedAdapter memcachedAdapter,
                                                    HibernateCacheTimestamper hibernateCacheTimestamper) {
    super(cacheNamespace, properties, metadata, settings, memcachedAdapter, hibernateCacheTimestamper);
}
 
源代码17 项目: J2Cache   文件: J2CacheCollectionRegion.java
public J2CacheCollectionRegion(J2CacheAccessStrategyFactory accessStrategyFactory, CacheRegion underlyingCache, Settings settings, CacheDataDescription metadata, Properties properties) {
    super(accessStrategyFactory, underlyingCache, settings, metadata, properties);
}
 
源代码18 项目: J2Cache   文件: J2CacheTransactionalDataRegion.java
J2CacheTransactionalDataRegion(J2CacheAccessStrategyFactory accessStrategyFactory, CacheRegion cache, Settings settings, CacheDataDescription metadata, Properties properties) {
    super(accessStrategyFactory, cache, properties);
    this.settings = settings;
    this.metadata = metadata;
}
 
源代码19 项目: J2Cache   文件: J2CacheTransactionalDataRegion.java
@Override
public CacheDataDescription getCacheDataDescription() {
    return metadata;
}
 
源代码20 项目: J2Cache   文件: J2CacheNaturalIdRegion.java
public J2CacheNaturalIdRegion(J2CacheAccessStrategyFactory accessStrategyFactory, CacheRegion underlyingCache, Settings settings, CacheDataDescription metadata, Properties properties) {
    super(accessStrategyFactory, underlyingCache, settings, metadata, properties);
}
 
源代码21 项目: J2Cache   文件: J2CacheEntityRegion.java
public J2CacheEntityRegion(J2CacheAccessStrategyFactory accessStrategyFactory, CacheRegion underlyingCache, Settings settings, CacheDataDescription metadata, Properties properties) {
    super(accessStrategyFactory,underlyingCache, settings, metadata, properties);
}
 
源代码22 项目: J2Cache   文件: J2CacheCollectionRegion.java
public J2CacheCollectionRegion(J2CacheAccessStrategyFactory accessStrategyFactory, CacheRegion underlyingCache, SessionFactoryOptions settings, CacheDataDescription metadata, Properties properties) {
    super(accessStrategyFactory, underlyingCache, settings, metadata, properties);
}
 
源代码23 项目: J2Cache   文件: J2CacheTransactionalDataRegion.java
J2CacheTransactionalDataRegion(J2CacheAccessStrategyFactory accessStrategyFactory, CacheRegion cache, SessionFactoryOptions settings, CacheDataDescription metadata, Properties properties) {
    super(accessStrategyFactory, cache, properties);
    this.settings = settings;
    this.metadata = metadata;
}
 
源代码24 项目: J2Cache   文件: J2CacheTransactionalDataRegion.java
@Override
public CacheDataDescription getCacheDataDescription() {
    return this.metadata;
}
 
源代码25 项目: J2Cache   文件: J2CacheNaturalIdRegion.java
public J2CacheNaturalIdRegion(J2CacheAccessStrategyFactory accessStrategyFactory, CacheRegion underlyingCache, SessionFactoryOptions settings, CacheDataDescription metadata, Properties properties) {
    super(accessStrategyFactory, underlyingCache, settings, metadata, properties);
}
 
源代码26 项目: J2Cache   文件: J2CacheEntityRegion.java
public J2CacheEntityRegion(J2CacheAccessStrategyFactory accessStrategyFactory, CacheRegion underlyingCache, SessionFactoryOptions settings, CacheDataDescription metadata, Properties properties) {
    super(accessStrategyFactory,underlyingCache, settings, metadata, properties);
}
 
源代码27 项目: ignite   文件: HibernateTransactionalDataRegion.java
/** {@inheritDoc} */
@Override public CacheDataDescription getCacheDataDescription() {
    return dataDesc;
}
 
源代码28 项目: ignite   文件: HibernateTransactionalDataRegion.java
/** {@inheritDoc} */
@Override public CacheDataDescription getCacheDataDescription() {
    return dataDesc;
}
 
源代码29 项目: redisson   文件: RedissonNaturalIdRegion.java
public RedissonNaturalIdRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory,
                               CacheDataDescription metadata, Settings settings, Properties properties, String defaultKey) {
    super(mapCache, connectionManager, regionFactory, metadata, properties, defaultKey);
    this.settings = settings;
}
 
源代码30 项目: redisson   文件: RedissonCollectionRegion.java
public RedissonCollectionRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory,
                                CacheDataDescription metadata, Settings settings, Properties properties, String defaultKey) {
    super(mapCache, connectionManager, regionFactory, metadata, properties, defaultKey);
    this.settings = settings;
}
 
 类所在包
 同包方法