org.jipijapa.cache.spi.Wrapper.getValue()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.1k)|赞(0)|评价(0)|浏览(179)

本文整理了Java中org.jipijapa.cache.spi.Wrapper.getValue()方法的一些代码示例,展示了Wrapper.getValue()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Wrapper.getValue()方法的具体详情如下:
包路径:org.jipijapa.cache.spi.Wrapper
类名称:Wrapper
方法名:getValue

Wrapper.getValue介绍

暂无

代码示例

代码示例来源:origin: wildfly/wildfly

JipiJapaCacheManager(Wrapper wrapper) {
  super((EmbeddedCacheManager) wrapper.getValue());
  this.wrapper = wrapper;
}

代码示例来源:origin: wildfly/wildfly

JipiJapaCacheManager(Wrapper wrapper) {
  super((EmbeddedCacheManager) wrapper.getValue());
  this.wrapper = wrapper;
}

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5-3

JipiJapaCacheManager(Wrapper wrapper) {
  super((EmbeddedCacheManager) wrapper.getValue());
  this.wrapper = wrapper;
}

代码示例来源:origin: org.jboss.eap/jipijapa-hibernate5

JipiJapaCacheManager(Wrapper wrapper) {
  super((EmbeddedCacheManager) wrapper.getValue());
  this.wrapper = wrapper;
}

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-1

@Override
protected EmbeddedCacheManager createCacheManager(Properties properties) {
  String container = properties.getProperty(CACHE_CONTAINER, DEFAULT_CACHE_CONTAINER);
  Properties cacheSettings = new Properties();
  cacheSettings.put(HibernateSecondLevelCache.CONTAINER, container);
  try {
    // Get the (shared) cache manager for JPA application use
    wrapper = Notification.startCache(Classification.INFINISPAN, cacheSettings);
    return (EmbeddedCacheManager)wrapper.getValue();
  } catch (Exception e) {
    throw new CacheException(e);
  }
}

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-3

@Override
protected EmbeddedCacheManager createCacheManager(Properties properties) {
  String container = properties.getProperty(CACHE_CONTAINER, DEFAULT_CACHE_CONTAINER);
  Properties cacheSettings = new Properties();
  cacheSettings.put(HibernateSecondLevelCache.CONTAINER, container);
  try {
    // Get the (shared) cache manager for JPA application use
    wrapper = Notification.startCache(Classification.INFINISPAN, cacheSettings);
    return (EmbeddedCacheManager)wrapper.getValue();
  } catch (Exception e) {
    throw new CacheException(e);
  }
}

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-3

@Override
protected EmbeddedCacheManager createCacheManager(Properties properties) throws CacheException {
  // Find a suitable service name to represent this session factory instance
  String name = properties.getProperty(AvailableSettings.SESSION_FACTORY_NAME);
  String container = properties.getProperty(CACHE_CONTAINER, DEFAULT_CACHE_CONTAINER);
  HibernateSecondLevelCache.addSecondLevelCacheDependencies(properties, null);
  Properties cacheSettings = new Properties();
  cacheSettings.put(HibernateSecondLevelCache.CACHE_TYPE,CACHE_PRIVATE);
  cacheSettings.put(HibernateSecondLevelCache.CONTAINER, container);
  if (name != null) {
    cacheSettings.put(HibernateSecondLevelCache.NAME, name);
  }
  try {
    // start a private cache for non-JPA use and return the started cache.
    wrapper = Notification.startCache(Classification.INFINISPAN, cacheSettings);
    return (EmbeddedCacheManager)wrapper.getValue();
  } catch (Exception e) {
    throw new CacheException(e);
  }
}

代码示例来源:origin: org.jipijapa/jipijapa-hibernate4-1

@Override
protected EmbeddedCacheManager createCacheManager(Properties properties) throws CacheException {
  // Find a suitable service name to represent this session factory instance
  String name = properties.getProperty(AvailableSettings.SESSION_FACTORY_NAME);
  String container = properties.getProperty(CACHE_CONTAINER, DEFAULT_CACHE_CONTAINER);
  HibernateSecondLevelCache.addSecondLevelCacheDependencies(properties, null);
  Properties cacheSettings = new Properties();
  cacheSettings.put(HibernateSecondLevelCache.CACHE_TYPE,CACHE_PRIVATE);
  cacheSettings.put(HibernateSecondLevelCache.CONTAINER, container);
  if (name != null) {
    cacheSettings.put(HibernateSecondLevelCache.NAME, name);
  }
  try {
    // start a private cache for non-JPA use and return the started cache.
    wrapper = Notification.startCache(Classification.INFINISPAN, cacheSettings);
    return (EmbeddedCacheManager)wrapper.getValue();
  } catch (Exception e) {
    throw new CacheException(e);
  }
}

代码示例来源:origin: stackoverflow.com

class Wrapper {
  MyKey   key;
  MyValue value;
  int     index;
  // constructor, getters and setters
}

int index=0;
while(moreItems) {
  // read input
  MyKey key = ...
  MyValue value = ...
  Wrapper w = new Wrapper(key,value,index++);
  list.add(w);
  map.put(key,w);
}
...
Wrapper w = list.get(23410);
MyKey k = w.getKey();
MyValue v = w.getValue();
int i = w.getIndex();
...

相关文章

Wrapper类方法