org.hibernate.cache.spi.CacheDataDescription Java Examples
The following examples show how to use
org.hibernate.cache.spi.CacheDataDescription.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BaseRegion.java From redisson with Apache License 2.0 | 6 votes |
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); }
Example #2
Source File: BaseRegion.java From redisson with Apache License 2.0 | 6 votes |
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); }
Example #3
Source File: BaseRegion.java From redisson with Apache License 2.0 | 6 votes |
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); }
Example #4
Source File: RedissonRegionFactory.java From redisson with Apache License 2.0 | 5 votes |
@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); }
Example #5
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public EntityRegion buildEntityRegion(String regionName, Properties props, CacheDataDescription metadata) throws CacheException { return new HibernateEntityRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName), metadata); }
Example #6
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties props, CacheDataDescription metadata) throws CacheException { return new HibernateNaturalIdRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName), metadata); }
Example #7
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public CollectionRegion buildCollectionRegion(String regionName, Properties props, CacheDataDescription metadata) throws CacheException { return new HibernateCollectionRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName), metadata); }
Example #8
Source File: HibernateNaturalIdRegion.java From ignite with Apache License 2.0 | 5 votes |
/** * @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); }
Example #9
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public CollectionRegion buildCollectionRegion(String regionName, Properties props, CacheDataDescription metadata) throws CacheException { return new HibernateCollectionRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName), metadata); }
Example #10
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public NaturalIdRegion buildNaturalIdRegion(String regionName, Properties props, CacheDataDescription metadata) throws CacheException { return new HibernateNaturalIdRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName), metadata); }
Example #11
Source File: HibernateRegionFactory.java From ignite with Apache License 2.0 | 5 votes |
/** {@inheritDoc} */ @Override public EntityRegion buildEntityRegion(String regionName, Properties props, CacheDataDescription metadata) throws CacheException { return new HibernateEntityRegion(this, regionName, accessStgyFactory.node(), accessStgyFactory.regionCache(regionName), metadata); }
Example #12
Source File: RedissonRegionFactory.java From redisson with Apache License 2.0 | 5 votes |
@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); }
Example #13
Source File: RedissonRegionFactory.java From redisson with Apache License 2.0 | 5 votes |
@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); }
Example #14
Source File: MemcachedRegion.java From hibernate4-memcached with Apache License 2.0 | 5 votes |
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; }
Example #15
Source File: NaturalIdMemcachedRegion.java From hibernate4-memcached with Apache License 2.0 | 5 votes |
public NaturalIdMemcachedRegion(String regionName, OverridableReadOnlyProperties properties, CacheDataDescription metadata, Settings settings, MemcachedAdapter memcachedAdapter, HibernateCacheTimestamper hibernateCacheTimestamper) { super(new CacheNamespace(regionName, true), properties, metadata, settings, memcachedAdapter, hibernateCacheTimestamper); }
Example #16
Source File: GeneralDataMemcachedRegionTest.java From hibernate4-memcached with Apache License 2.0 | 5 votes |
public RefineKeyOverridedGeneralDataMemcachedRegion(CacheNamespace cacheNamespace, OverridableReadOnlyProperties properties, CacheDataDescription metadata, Settings settings, MemcachedAdapter memcachedAdapter, HibernateCacheTimestamper hibernateCacheTimestamper) { super(cacheNamespace, properties, metadata, settings, memcachedAdapter, hibernateCacheTimestamper); }
Example #17
Source File: RedissonCollectionRegion.java From redisson with Apache License 2.0 | 4 votes |
public RedissonCollectionRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Settings settings, Properties properties, String defaultKey, CacheKeysFactory cacheKeysFactory) { super(mapCache, connectionManager, regionFactory, metadata, properties, defaultKey); this.settings = settings; this.cacheKeysFactory = cacheKeysFactory; }
Example #18
Source File: RedissonNaturalIdRegion.java From redisson with Apache License 2.0 | 4 votes |
public RedissonNaturalIdRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Settings settings, Properties properties, String defaultKey, CacheKeysFactory cacheKeysFactory) { super(mapCache, connectionManager, regionFactory, metadata, properties, defaultKey); this.settings = settings; this.cacheKeysFactory = cacheKeysFactory; }
Example #19
Source File: RedissonCollectionRegion.java From redisson with Apache License 2.0 | 4 votes |
public RedissonCollectionRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Settings settings, Properties properties, String defaultKey, CacheKeysFactory cacheKeysFactory) { super(mapCache, connectionManager, regionFactory, metadata, properties, defaultKey); this.settings = settings; this.cacheKeysFactory = cacheKeysFactory; }
Example #20
Source File: RedissonEntityRegion.java From redisson with Apache License 2.0 | 4 votes |
public RedissonEntityRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Settings settings, Properties properties, String defaultKey, CacheKeysFactory cacheKeysFactory) { super(mapCache, connectionManager, regionFactory, metadata, properties, defaultKey); this.settings = settings; this.cacheKeysFactory = cacheKeysFactory; }
Example #21
Source File: BaseRegion.java From redisson with Apache License 2.0 | 4 votes |
@Override public CacheDataDescription getCacheDataDescription() { return metadata; }
Example #22
Source File: RedissonNaturalIdRegion.java From redisson with Apache License 2.0 | 4 votes |
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; }
Example #23
Source File: BaseRegion.java From redisson with Apache License 2.0 | 4 votes |
@Override public CacheDataDescription getCacheDataDescription() { return metadata; }
Example #24
Source File: RedissonEntityRegion.java From redisson with Apache License 2.0 | 4 votes |
public RedissonEntityRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Settings settings, Properties properties, String defaultKey, CacheKeysFactory cacheKeysFactory) { super(mapCache, connectionManager, regionFactory, metadata, properties, defaultKey); this.settings = settings; this.cacheKeysFactory = cacheKeysFactory; }
Example #25
Source File: NaturalIdRegionImpl.java From hibernate4-memcached with Apache License 2.0 | 4 votes |
NaturalIdRegionImpl(String name, CacheDataDescription metadata, Settings settings) { super( name, metadata ); this.settings=settings; }
Example #26
Source File: BaseTransactionalDataRegion.java From hibernate4-memcached with Apache License 2.0 | 4 votes |
BaseTransactionalDataRegion(String name, CacheDataDescription metadata) { super( name ); this.metadata = metadata; }
Example #27
Source File: BaseTransactionalDataRegion.java From hibernate4-memcached with Apache License 2.0 | 4 votes |
@Override public CacheDataDescription getCacheDataDescription() { return metadata; }
Example #28
Source File: CollectionRegionImpl.java From hibernate4-memcached with Apache License 2.0 | 4 votes |
CollectionRegionImpl(String name, CacheDataDescription metadata, Settings settings) { super( name, metadata ); this.settings=settings; }
Example #29
Source File: EntityRegionImpl.java From hibernate4-memcached with Apache License 2.0 | 4 votes |
EntityRegionImpl(String name, CacheDataDescription metadata, Settings settings) { super( name, metadata ); this.settings = settings; }
Example #30
Source File: MemcachedRegion.java From hibernate4-memcached with Apache License 2.0 | 4 votes |
public CacheDataDescription getMetadata() { return metadata; }