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


Java TitanManagement.set方法代码示例

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


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

示例1: clopen

import com.thinkaurelius.titan.core.schema.TitanManagement; //导入方法依赖的package包/类
public void clopen(Object... settings) {
    config = getConfiguration();
    if (mgmt!=null && mgmt.isOpen()) mgmt.rollback();
    if (null != tx && tx.isOpen()) tx.commit();
    if (settings!=null && settings.length>0) {
        Map<TestConfigOption,Object> options = validateConfigOptions(settings);
        TitanManagement gconf = null;
        ModifiableConfiguration lconf = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS,config, BasicConfiguration.Restriction.LOCAL);
        for (Map.Entry<TestConfigOption,Object> option : options.entrySet()) {
            if (option.getKey().option.isLocal()) {
                lconf.set(option.getKey().option,option.getValue(),option.getKey().umbrella);
            } else {
                if (gconf==null) gconf = graph.openManagement();
                gconf.set(ConfigElement.getPath(option.getKey().option,option.getKey().umbrella),option.getValue());
            }
        }
        if (gconf!=null) gconf.commit();
        lconf.close();
    }
    if (null != graph && graph.isOpen())
        graph.close();
    Preconditions.checkNotNull(config);
    open(config);
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:25,代码来源:TitanGraphBaseTest.java

示例2: clopen

import com.thinkaurelius.titan.core.schema.TitanManagement; //导入方法依赖的package包/类
public void clopen(Object... settings) {
    config = getConfiguration();
    if (mgmt!=null && mgmt.isOpen()) mgmt.rollback();
    if (null != tx && tx.isOpen()) tx.commit();
    if (settings!=null && settings.length>0) {
        //Parse settings
        Preconditions.checkArgument(settings.length%2==0,"Expected even number of settings: %s",settings);
        Map<TestConfigOption,Object> options = Maps.newHashMap();
        for (int i=0;i<settings.length;i=i+2) {
            Preconditions.checkArgument(settings[i] instanceof TestConfigOption,"Expected configuration option but got: %s",settings[i]);
            Preconditions.checkNotNull(settings[i+1],"Null setting at position [%s]",i+1);
            options.put((TestConfigOption)settings[i],settings[i+1]);
        }
        TitanManagement gconf = null;
        ModifiableConfiguration lconf = new ModifiableConfiguration(GraphDatabaseConfiguration.ROOT_NS,config, BasicConfiguration.Restriction.LOCAL);
        for (Map.Entry<TestConfigOption,Object> option : options.entrySet()) {
            if (option.getKey().option.isLocal()) {
                lconf.set(option.getKey().option,option.getValue(),option.getKey().umbrella);
            } else {
                if (gconf==null) gconf = graph.getManagementSystem();
                gconf.set(ConfigElement.getPath(option.getKey().option,option.getKey().umbrella),option.getValue());
            }
        }
        if (gconf!=null) gconf.commit();
        lconf.close();
    }
    if (null != graph && graph.isOpen())
        graph.shutdown();
    Preconditions.checkNotNull(config);
    open(config);
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:32,代码来源:TitanGraphBaseTest.java


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