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


Java Mutations.addRenamer方法代码示例

本文整理汇总了Java中com.sleepycat.persist.evolve.Mutations.addRenamer方法的典型用法代码示例。如果您正苦于以下问题:Java Mutations.addRenamer方法的具体用法?Java Mutations.addRenamer怎么用?Java Mutations.addRenamer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sleepycat.persist.evolve.Mutations的用法示例。


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

示例1: getMutations

import com.sleepycat.persist.evolve.Mutations; //导入方法依赖的package包/类
@Override
Mutations getMutations() {
    Mutations m = new Mutations();
    m.addRenamer(new Renamer(NAME, 0, "pkeyint", "pkeyInteger"));
    m.addRenamer(new Renamer(NAME, 0, "kboolean", "kBoolean"));
    m.addRenamer(new Renamer(NAME, 0, "kbyte", "kByte"));
    m.addRenamer(new Renamer(NAME, 0, "kshort", "kShort"));
    m.addRenamer(new Renamer(NAME, 0, "kint", "kInteger"));
    m.addRenamer(new Renamer(NAME, 0, "klong", "kLong"));
    m.addRenamer(new Renamer(NAME, 0, "kfloat", "kFloat"));
    m.addRenamer(new Renamer(NAME, 0, "kdouble", "kDouble"));
    m.addRenamer(new Renamer(NAME, 0, "kchar", "kCharacter"));
    m.addRenamer(new Renamer(NAME2, 0, "kcomposite", "kComposite"));

    Conversion conv1 = new MyConversion1();
    Conversion conv2 = new MyConversion2();

    m.addConverter(new Converter(NAME, 0, "f_long2int", conv1));
    m.addConverter(new Converter(NAME, 0, "f_String2long", conv2));
    m.addConverter(new Converter(NAME2, 0, "f_long2Integer", conv1));
    m.addConverter(new Converter(NAME2, 0, "f_String2Long", conv2));
    return m;
}
 
开发者ID:nologic,项目名称:nabs,代码行数:24,代码来源:EvolveClasses.java

示例2: BerkeleyDbTileStore

import com.sleepycat.persist.evolve.Mutations; //导入方法依赖的package包/类
public BerkeleyDbTileStore() throws TileStoreException {
	super();
	acquireTileStoreLock();
	tileDbMap = new TreeMap<String, TileDatabase>();

	envConfig = new EnvironmentConfig();
	envConfig.setTransactional(false);
	envConfig.setLocking(true);
	envConfig.setExceptionListener(GUIExceptionHandler.getInstance());
	envConfig.setAllowCreate(true);
	envConfig.setSharedCache(true);
	envConfig.setCachePercent(50);

	mutations = new Mutations();

	String oldPackage1 = "tac.tilestore.berkeleydb";
	String oldPackage2 = "tac.program.tilestore.berkeleydb";
	String entry = ".TileDbEntry";
	String key = ".TileDbEntry$TileDbKey";
	mutations.addRenamer(new Renamer(oldPackage1 + entry, 0, TileDbEntry.class.getName()));
	mutations.addRenamer(new Renamer(oldPackage1 + key, 0, TileDbKey.class.getName()));
	mutations.addRenamer(new Renamer(oldPackage1 + entry, 1, TileDbEntry.class.getName()));
	mutations.addRenamer(new Renamer(oldPackage1 + key, 1, TileDbKey.class.getName()));
	mutations.addRenamer(new Renamer(oldPackage2 + entry, 2, TileDbEntry.class.getName()));
	mutations.addRenamer(new Renamer(oldPackage2 + key, 2, TileDbKey.class.getName()));

	// for (Renamer r : mutations.getRenamers())
	// log.debug(r.toString());
	Runtime.getRuntime().addShutdownHook(new ShutdownThread(true));
}
 
开发者ID:bh4017,项目名称:mobac,代码行数:31,代码来源:BerkeleyDbTileStore.java


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