当前位置: 首页>>代码示例>>Java>>正文


Java Fqn类代码示例

本文整理汇总了Java中org.jboss.cache.Fqn的典型用法代码示例。如果您正苦于以下问题:Java Fqn类的具体用法?Java Fqn怎么用?Java Fqn使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Fqn类属于org.jboss.cache包,在下文中一共展示了Fqn类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeLoad

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void writeLoad(Object key, Object value, Object currentVersion) {
	try {
		Option option = new Option();
		option.setFailSilently( true );
		option.setDataVersion( NonLockingDataVersion.INSTANCE );
		cache.remove( new Fqn( regionFqn, key ), "ITEM", option );

		option = new Option();
		option.setFailSilently( true );
		DataVersion dv = ( source != null && source.isVersioned() )
		                 ? new DataVersionAdapter( currentVersion, currentVersion, source.getVersionComparator(), source.toString() )
		                 : NonLockingDataVersion.INSTANCE;
		option.setDataVersion( dv );
		cache.put( new Fqn( regionFqn, key ), ITEM, value, option );
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:20,代码来源:OptimisticTreeCache.java

示例2: put

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void put(Object key, Object value) throws CacheException {
	try {
		log.trace( "performing put() into region [" + regionName + "]" );
		// do the put outside the scope of the JTA txn
		Option option = new Option();
		option.setFailSilently( true );
		option.setDataVersion( NonLockingDataVersion.INSTANCE );
		cache.put( new Fqn( regionFqn, key ), ITEM, value, option );
	}
	catch (TimeoutException te) {
		//ignore!
		log.debug("ignoring write lock acquisition failure");
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:18,代码来源:OptimisticTreeCache.java

示例3: remove

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void remove(Object key) throws CacheException {
	try {
		// tree cache in optimistic mode seems to have as very difficult
		// time with remove calls on non-existent nodes (NPEs)...
		if ( cache.get( new Fqn( regionFqn, key ), ITEM ) != null ) {
			Option option = new Option();
			option.setDataVersion( NonLockingDataVersion.INSTANCE );
			cache.remove( new Fqn( regionFqn, key ), option );
		}
		else {
			log.trace( "skipping remove() call as the underlying node did not seem to exist" );
		}
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:18,代码来源:OptimisticTreeCache.java

示例4: toMap

import org.jboss.cache.Fqn; //导入依赖的package包/类
public Map toMap() {
	try {
		Map result = new HashMap();
		Set childrenNames = cache.getChildrenNames( regionFqn );
		if (childrenNames != null) {
			Iterator iter = childrenNames.iterator();
			while ( iter.hasNext() ) {
				Object key = iter.next();
				result.put(
						key,
				        cache.get( new Fqn( regionFqn, key ), ITEM )
					);
			}
		}
		return result;
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:21,代码来源:OptimisticTreeCache.java

示例5: put

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void put(Object key, Object value) throws CacheException {
	Transaction tx = suspend();
	try {
		//do the failfast put outside the scope of the JTA txn
		cache.putFailFast( new Fqn( regionFqn, key ), ITEM, value, 0 );
	}
	catch (TimeoutException te) {
		//ignore!
		log.debug("ignoring write lock acquisition failure");
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
	finally {
		resume( tx );
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:18,代码来源:TreeCache.java

示例6: toMap

import org.jboss.cache.Fqn; //导入依赖的package包/类
public Map toMap() {
	try {
		Map result = new HashMap();
		Set childrenNames = cache.getChildrenNames( regionFqn );
		if (childrenNames != null) {
			Iterator iter = childrenNames.iterator();
			while ( iter.hasNext() ) {
				Object key = iter.next();
				result.put( 
						key, 
						cache.get( new Fqn( regionFqn, key ), ITEM )
					);
			}
		}
		return result;
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:21,代码来源:TreeCache.java

示例7: get

import org.jboss.cache.Fqn; //导入依赖的package包/类
public Object get(Object key) throws CacheException {
	try {
		return cache.get( new Fqn( new Object[] { regionName, key } ), ITEM );
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:TreeCache.java

示例8: put

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void put(Object key, Object value) throws CacheException {
	try {
		cache.put( new Fqn( new Object[] { regionName, key } ), ITEM, value );
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:TreeCache.java

示例9: remove

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void remove(Object key) throws CacheException {
	try {
		cache.remove( new Fqn( new Object[] { regionName, key } ) );
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:TreeCache.java

示例10: clear

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void clear() throws CacheException {
	try {
		cache.remove( new Fqn(regionName) );
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:TreeCache.java

示例11: writeUpdate

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void writeUpdate(Object key, Object value, Object currentVersion, Object previousVersion) {
	try {
		Option option = new Option();
		DataVersion dv = ( source != null && source.isVersioned() )
		                 ? new DataVersionAdapter( currentVersion, previousVersion, source.getVersionComparator(), source.toString() )
		                 : NonLockingDataVersion.INSTANCE;
		option.setDataVersion( dv );
		cache.put( new Fqn( regionFqn, key ), ITEM, value, option );
	}
	catch ( Exception e ) {
		throw new CacheException( e );
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:14,代码来源:OptimisticTreeCache.java

示例12: get

import org.jboss.cache.Fqn; //导入依赖的package包/类
public Object get(Object key) throws CacheException {
		try {
			Option option = new Option();
			option.setFailSilently( true );
//			option.setDataVersion( NonLockingDataVersion.INSTANCE );
			return cache.get( new Fqn( regionFqn, key ), ITEM, option );
		}
		catch (Exception e) {
			throw new CacheException(e);
		}
	}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:12,代码来源:OptimisticTreeCache.java

示例13: read

import org.jboss.cache.Fqn; //导入依赖的package包/类
public Object read(Object key) throws CacheException {
	try {
		return cache.get( new Fqn( regionFqn, key ), ITEM );
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:9,代码来源:OptimisticTreeCache.java

示例14: update

import org.jboss.cache.Fqn; //导入依赖的package包/类
public void update(Object key, Object value) throws CacheException {
	try {
		Option option = new Option();
		option.setDataVersion( NonLockingDataVersion.INSTANCE );
		cache.put( new Fqn( regionFqn, key ), ITEM, value, option );
	}
	catch (Exception e) {
		throw new CacheException(e);
	}
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:11,代码来源:OptimisticTreeCache.java

示例15: TreeCache

import org.jboss.cache.Fqn; //导入依赖的package包/类
public TreeCache(org.jboss.cache.TreeCache cache, String regionName, TransactionManager transactionManager) 
throws CacheException {
	this.cache = cache;
	this.regionName = regionName;
	this.regionFqn = Fqn.fromString( regionName.replace( '.', '/' ) );
	this.transactionManager = transactionManager;
}
 
开发者ID:cacheonix,项目名称:cacheonix-core,代码行数:8,代码来源:TreeCache.java


注:本文中的org.jboss.cache.Fqn类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。