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


Java ConflictAvoidanceMode类代码示例

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


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

示例1: configs

import com.thinkaurelius.titan.diskstorage.idmanagement.ConflictAvoidanceMode; //导入依赖的package包/类
@Parameterized.Parameters
public static Collection<Object[]> configs() {
    List<Object[]> configurations = new ArrayList<Object[]>();

    ModifiableConfiguration c = getBasicConfig();
    configurations.add(new Object[]{c.getConfiguration()});

    c = getBasicConfig();
    c.set(IDAUTHORITY_CAV_BITS,9);
    c.set(IDAUTHORITY_CAV_TAG,511);
    configurations.add(new Object[]{c.getConfiguration()});

    c = getBasicConfig();
    c.set(IDAUTHORITY_CAV_RETRIES,10);
    c.set(IDAUTHORITY_WAIT, Duration.ofMillis(10L));
    c.set(IDAUTHORITY_CAV_BITS,7);
    //c.set(IDAUTHORITY_RANDOMIZE_UNIQUEID,true);
    c.set(IDAUTHORITY_CONFLICT_AVOIDANCE, ConflictAvoidanceMode.GLOBAL_AUTO);
    configurations.add(new Object[]{c.getConfiguration()});

    return configurations;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:23,代码来源:IDAuthorityTest.java

示例2: configs

import com.thinkaurelius.titan.diskstorage.idmanagement.ConflictAvoidanceMode; //导入依赖的package包/类
@Parameterized.Parameters
public static Collection<Object[]> configs() {
    List<Object[]> configurations = new ArrayList<Object[]>();

    ModifiableConfiguration c = getBasicConfig();
    configurations.add(new Object[]{c.getConfiguration()});

    c = getBasicConfig();
    c.set(IDAUTHORITY_CAV_BITS,9);
    c.set(IDAUTHORITY_CAV_TAG,511);
    configurations.add(new Object[]{c.getConfiguration()});

    c = getBasicConfig();
    c.set(IDAUTHORITY_CAV_RETRIES,10);
    c.set(IDAUTHORITY_WAIT, new StandardDuration(10L, TimeUnit.MILLISECONDS));
    c.set(IDAUTHORITY_CAV_BITS,7);
    //c.set(IDAUTHORITY_RANDOMIZE_UNIQUEID,true);
    c.set(IDAUTHORITY_CONFLICT_AVOIDANCE, ConflictAvoidanceMode.GLOBAL_AUTO);
    configurations.add(new Object[]{c.getConfiguration()});

    return configurations;
}
 
开发者ID:graben1437,项目名称:titan0.5.4-hbase1.1.1-custom,代码行数:23,代码来源:IDAuthorityTest.java

示例3: IDAuthorityTest

import com.thinkaurelius.titan.diskstorage.idmanagement.ConflictAvoidanceMode; //导入依赖的package包/类
public IDAuthorityTest(WriteConfiguration baseConfig) {
    Preconditions.checkNotNull(baseConfig);
    TestGraphConfigs.applyOverrides(baseConfig);
    this.baseStoreConfiguration = baseConfig;
    Configuration config = StorageSetup.getConfig(baseConfig);
    uidBitWidth = config.get(IDAUTHORITY_CAV_BITS);
    //hasFixedUid = !config.get(IDAUTHORITY_RANDOMIZE_UNIQUEID);
    hasFixedUid = !ConflictAvoidanceMode.GLOBAL_AUTO.equals(config.get(IDAUTHORITY_CONFLICT_AVOIDANCE));
    hasEmptyUid = uidBitWidth==0;
    blockSize = config.get(IDS_BLOCK_SIZE);
    idUpperBoundBitWidth = 30;
    idUpperBound = 1l<<idUpperBoundBitWidth;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:14,代码来源:IDAuthorityTest.java

示例4: StandardSerializer

import com.thinkaurelius.titan.diskstorage.idmanagement.ConflictAvoidanceMode; //导入依赖的package包/类
public StandardSerializer() {
    handlers = new HashMap<>(60);
    registrations = HashBiMap.create(60);

    //Setup
    registerClassInternal(1, Object.class, new ObjectSerializer());



    //Primitive data types
    registerClassInternal(10, Byte.class, new ByteSerializer());
    registerClassInternal(11,Short.class, new ShortSerializer());
    registerClassInternal(12,Integer.class, new IntegerSerializer());
    registerClassInternal(13,Long.class, new LongSerializer());

    registerClassInternal(14,Character.class, new CharacterSerializer());
    registerClassInternal(15,Boolean.class, new BooleanSerializer());
    registerClassInternal(16,Date.class, new DateSerializer());

    registerClassInternal(17,Geoshape.class, new Geoshape.GeoshapeSerializer());
    registerClassInternal(18,String.class, new StringSerializer()); //supports null serialization
    registerClassInternal(19,Float.class, new FloatSerializer());
    registerClassInternal(20,Double.class, new DoubleSerializer());
    registerClassInternal(21,UUID.class, new UUIDSerializer());


    //Arrays (support null serialization)
    registerClassInternal(22,byte[].class, new ByteArraySerializer());
    registerClassInternal(23,short[].class, new ShortArraySerializer());
    registerClassInternal(24,int[].class, new IntArraySerializer());
    registerClassInternal(25,long[].class, new LongArraySerializer());
    registerClassInternal(26,float[].class, new FloatArraySerializer());
    registerClassInternal(27,double[].class, new DoubleArraySerializer());
    registerClassInternal(28,char[].class, new CharArraySerializer());
    registerClassInternal(29,boolean[].class, new BooleanArraySerializer());
    registerClassInternal(30, String[].class, new StringArraySerializer());

    //Needed by Titan
    registerClassInternal(41,TypeDefinitionCategory.class, new EnumSerializer<>(TypeDefinitionCategory.class));
    registerClassInternal(42,TitanSchemaCategory.class, new EnumSerializer<>(TitanSchemaCategory.class));
    registerClassInternal(43,ParameterType.class, new EnumSerializer<>(ParameterType.class));
    registerClassInternal(44,RelationCategory.class, new EnumSerializer<>(RelationCategory.class));
    registerClassInternal(45,Order.class, new EnumSerializer<>(Order.class));
    registerClassInternal(46,Multiplicity.class, new EnumSerializer<>(Multiplicity.class));
    registerClassInternal(47,Cardinality.class, new EnumSerializer<>(Cardinality.class));
    registerClassInternal(48,Direction.class, new EnumSerializer<>(Direction.class));
    registerClassInternal(49,ElementCategory.class, new EnumSerializer<>(ElementCategory.class));
    registerClassInternal(50,ConsistencyModifier.class, new EnumSerializer<>(ConsistencyModifier.class));
    registerClassInternal(51,SchemaStatus.class, new EnumSerializer<>(SchemaStatus.class));
    registerClassInternal(52,LogTxStatus.class, new EnumSerializer<>(LogTxStatus.class));
    registerClassInternal(53,MgmtLogType.class, new EnumSerializer<>(MgmtLogType.class));
    registerClassInternal(54,TimestampProviders.class, new EnumSerializer<>(TimestampProviders.class));
    registerClassInternal(55,TimeUnit.class, new EnumSerializer<>(TimeUnit.class));
    registerClassInternal(56,Mapping.class, new EnumSerializer<>(Mapping.class));
    registerClassInternal(57,ConflictAvoidanceMode.class, new EnumSerializer<>(ConflictAvoidanceMode.class));

    registerClassInternal(60,Class.class, new ClassSerializer());
    registerClassInternal(61,Parameter.class, new ParameterSerializer());
    registerClassInternal(62,Parameter[].class, new ParameterArraySerializer());
    registerClassInternal(63,TypeDefinitionDescription.class, new TypeDefinitionDescriptionSerializer());
    //Needed for configuration and transaction logging
    registerClassInternal(64,Duration.class, new DurationSerializer());
    registerClassInternal(65,Instant.class, new InstantSerializer());
    registerClassInternal(66,StandardTransactionId.class, new StandardTransactionIdSerializer());

}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:67,代码来源:StandardSerializer.java


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