On set compaction strategy.

@param cfDef
the cf def
@param cfProperties
the cf properties
@param builder
the builder
487824
private void onSetCompactionStrategy(CfDef cfDef, Properties cfProperties, StringBuilder builder)
    {
        String compactionStrategy = cfProperties.getProperty(CassandraConstants.COMPACTION_STRATEGY);
        if (compactionStrategy != null)
        {
            if (builder != null)
            {
                String strategy_class = CQLTranslator.getKeyword(CassandraConstants.COMPACTION_STRATEGY);
                builder.append(strategy_class);
                builder.append(CQLTranslator.EQ_CLAUSE);
                builder.append(CQLTranslator.QUOTE_STR);
                builder.append(compactionStrategy);
                builder.append(CQLTranslator.QUOTE_STR);
                builder.append(CQLTranslator.AND_CLAUSE);
            }
            else
            {
                cfDef.setCompaction_strategy(compactionStrategy);
            }
        }
    }
227061
private static void buildMutateRowSettings(Builder builder, BigtableOptions options) {
    RetrySettings retrySettings =
        buildIdempotentRetrySettings(builder.mutateRowSettings().getRetrySettings(), options);

    builder.mutateRowSettings()
        .setRetrySettings(retrySettings)
        .setRetryableCodes(buildRetryCodes(options.getRetryOptions()));
  }
1115889
private void onSetReplicateOnWrite(CfDef cfDef, Properties cfProperties, StringBuilder builder)
    {
        String replicateOnWrite = cfProperties.getProperty(CassandraConstants.REPLICATE_ON_WRITE);
        if (builder != null)
        {
            String replicateOn_Write = CQLTranslator.getKeyword(CassandraConstants.REPLICATE_ON_WRITE);
            builder.append(replicateOn_Write);
            builder.append(CQLTranslator.EQ_CLAUSE);
            builder.append(Boolean.parseBoolean(replicateOnWrite));
            builder.append(CQLTranslator.AND_CLAUSE);
        }
        else if (cfDef != null)
        {
            cfDef.setReplicate_on_write(false);
        }
    }
808802
private void onSetCompactionThreshold(CfDef cfDef, Properties cfProperties, StringBuilder builder)
    {
        String maxCompactionThreshold = cfProperties.getProperty(CassandraConstants.MAX_COMPACTION_THRESHOLD);
        if (maxCompactionThreshold != null)
        {
            try
            {
                if (builder != null)
                {
                    // Somehow these are not working for cassandra 1.1
                    // though they claim it should work.
                    // appendPropertyToBuilder(builder,
                    // maxCompactionThreshold,
                    // CassandraConstants.MAX_COMPACTION_THRESHOLD);
                }
                else
                {
                    cfDef.setMax_compaction_threshold(Integer.parseInt(maxCompactionThreshold));
                }
            }
            catch (NumberFormatException nfe)
            {
                log.error("Max_Compaction_Threshold should be numeric type, Caused by: .", nfe);
                throw new SchemaGenerationException(nfe);
            }
        }
        String minCompactionThreshold = cfProperties.getProperty(CassandraConstants.MIN_COMPACTION_THRESHOLD);
        if (minCompactionThreshold != null)
        {
            try
            {
                if (builder != null)
                {
                    // Somehow these are not working for cassandra 1.1
                    // though they claim it should work.
                    // appendPropertyToBuilder(builder,
                    // minCompactionThreshold,
                    // CassandraConstants.MIN_COMPACTION_THRESHOLD);
                }
                else
                {
                    cfDef.setMin_compaction_threshold(Integer.parseInt(minCompactionThreshold));
                }
            }
            catch (NumberFormatException nfe)
            {
                log.error("Min_Compaction_Threshold should be numeric type, Caused by: . ", nfe);
                throw new SchemaGenerationException(nfe);
            }
        }
    }
194214
protected void buildSetMethod(ClassVisitor cw,
                                  ClassDefinition classDef,
                                  FieldDefinition fieldDef) {
        MethodVisitor mv;
        // set method
        {
            mv = cw.visitMethod( Opcodes.ACC_PUBLIC,
                    fieldDef.getWriteMethod(),
                    Type.getMethodDescriptor( Type.VOID_TYPE,
                            new Type[]{Type.getType( BuildUtils.getTypeDescriptor( fieldDef.getTypeName() ) )} ),
                    null,
                    null );
            mv.visitCode();
            Label l0 = null;
            if ( this.debug ) {
                l0 = new Label();
                mv.visitLabel( l0 );
            }
            mv.visitVarInsn( Opcodes.ALOAD, 0 );

            if ( classDef.isTraitable() && classDef.isFullTraiting() ) {
                updateTraitableField( mv, classDef, fieldDef );
            } else {
                mv.visitVarInsn( Type.getType( BuildUtils.getTypeDescriptor( fieldDef.getTypeName() ) ).getOpcode( Opcodes.ILOAD ), 1 );
            }

            if ( ! fieldDef.hasOverride() ) {
                mv.visitFieldInsn( Opcodes.PUTFIELD,
                                   BuildUtils.getInternalType( classDef.getClassName() ),
                                   fieldDef.getName(),
                                   BuildUtils.getTypeDescriptor( fieldDef.getTypeName() ) );
            } else {
                mv.visitMethodInsn( INVOKESPECIAL,
                                    BuildUtils.getInternalType( classDef.getSuperClass() ),
                                    BuildUtils.setterName( fieldDef.getName(), fieldDef.getOverriding() ),
                                    Type.getMethodDescriptor( Type.VOID_TYPE,
                                                              new Type[]{Type.getType( BuildUtils.getTypeDescriptor( fieldDef.getOverriding()) )} ),
                                    false );
            }

            if (classDef.isReactive()) {
                mv.visitVarInsn( ALOAD, 0 );
                mv.visitMethodInsn( INVOKEVIRTUAL, BuildUtils.getInternalType( classDef.getClassName() ), "notifyModification", "()V", false );
            }

            mv.visitInsn( Opcodes.RETURN );
            Label l1 = null;
            if ( this.debug ) {
                l1 = new Label();
                mv.visitLabel( l1 );
                mv.visitLocalVariable( "this",
                        BuildUtils.getTypeDescriptor( classDef.getClassName() ),
                        null,
                        l0,
                        l1,
                        0 );
            }
            mv.visitMaxs( 0, 0 );
            mv.visitEnd();
        }
    }
1047481
public Datatype.Builder setBuilderSerializable(boolean builderSerializable) {
    this.builderSerializable = builderSerializable;
    _unsetProperties.remove(Property.BUILDER_SERIALIZABLE);
    return (Datatype.Builder) this;
  }
212960
protected void buildField( ClassVisitor cw,
                               FieldDefinition fieldDef) {
        FieldVisitor fv = cw.visitField( Opcodes.ACC_PROTECTED,
                                         fieldDef.getName(),
                                         BuildUtils.getTypeDescriptor( fieldDef.getTypeName() ),
                                         null,
                                         null );


        buildFieldAnnotations( fieldDef, fv );

        fv.visitEnd();
    }
610237
private void onSetRepairChance(CfDef cfDef, Properties cfProperties, StringBuilder builder)
    {
        String readRepairChance = cfProperties.getProperty(CassandraConstants.READ_REPAIR_CHANCE);
        if (readRepairChance != null)
        {
            try
            {
                if (builder != null)
                {
                    appendPropertyToBuilder(builder, readRepairChance, CassandraConstants.READ_REPAIR_CHANCE);
                }
                else
                {
                    cfDef.setRead_repair_chance(Double.parseDouble(readRepairChance));
                }
            }
            catch (NumberFormatException nfe)
            {
                log.error("READ_REPAIR_CHANCE should be double type, Caused by: .", nfe);
                throw new SchemaGenerationException(nfe);
            }
        }
    }
489890
@Nonnull
	public static LBiFltConsumer biFltConsumerFrom(Consumer<LBiFltConsumerBuilder> buildingFunction) {
		LBiFltConsumerBuilder builder = new LBiFltConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
929547
public static CFGBuilder create(@Nonnull MethodDescriptor descriptor, @Nonnull MethodGen methodGen) {
        return new BetterCFGBuilder2(descriptor, methodGen);
    }
667489
protected void addProperties(Element element, BeanDefinitionBuilder builder) {
        NamedNodeMap attributes = element.getAttributes();
        
        for (int i = 0; i < attributes.getLength(); i++) {
            Node node = attributes.item(i);
            String attrName = getNodeName(node);
            attrName = "class".equals(attrName) ? "clazz" : attrName;
            builder.addPropertyValue(attrName, node.getNodeValue());
        }
    }
217554
private void onSetSubComparator(CfDef cfDef, Properties cfProperties, StringBuilder builder)
    {
        String subComparatorType = cfProperties.getProperty(CassandraConstants.SUBCOMPARATOR_TYPE);
        if (subComparatorType != null && ColumnFamilyType.valueOf(cfDef.getColumn_type()) == ColumnFamilyType.Super)
        {
            if (builder != null)
            {
                // super column are not supported for composite key as of
                // now, leaving blank place holder..
            }
            else
            {
                cfDef.setSubcomparator_type(subComparatorType);
            }
        }
    }
548387
public void setForceFieldConfigurator(String ffname, IChemObjectBuilder builder) throws CDKException {
        ffname = ffname.toLowerCase();
        boolean check = false;

        if (ffname == ffName && parameterSet != null) {
        } else {
            check = this.checkForceFieldType(ffname);
            ffName = ffname;
            if (ffName.equals("mm2")) {
                //logger.debug("ForceFieldConfigurator: open Force Field mm2");
                //f = new File(mm2File);
                //readFile(f);
                ins = this.getClass().getClassLoader()
                        .getResourceAsStream("org/openscience/cdk/modeling/forcefield/data/mm2.prm");
                //logger.debug("ForceFieldConfigurator: open Force Field mm2 ... READY");
                mm2 = new MM2BasedParameterSetReader();
                mm2.setInputStream(ins);
                //logger.debug("ForceFieldConfigurator: mm2 set input stream ... READY");
                try {
                    this.setMM2Parameters(builder);
                } catch (Exception ex1) {
                    throw new CDKException("Problems with set MM2Parameters due to " + ex1.toString(), ex1);
                }
            } else if (ffName.equals("mmff94") || !check) {
                //logger.debug("ForceFieldConfigurator: open Force Field mmff94");
                //f = new File(mmff94File);
                //readFile(f);
                ins = this.getClass().getClassLoader()
                        .getResourceAsStream("org/openscience/cdk/modeling/forcefield/data/mmff94.prm");
                mmff94 = new MMFF94BasedParameterSetReader();

                mmff94.setInputStream(ins);
                try {
                    this.setMMFF94Parameters(builder);
                } catch (Exception ex2) {
                    throw new CDKException("Problems with set MM2Parameters due to" + ex2.toString(), ex2);
                }
            }
        }
        //throw new CDKException("Data file for "+ffName+" force field could not be found");
    }
476435
public static List<ColumnFamilyDescriptor> buildColumnFamilyDescriptors(
            ColumnFamilyOptions cfOptions, String... cfNames) {
        List<ColumnFamilyDescriptor> result = new ArrayList<>();
        if (cfNames != null) {
            for (String cfName : cfNames) {
                result.add(buildColumnFamilyDescriptor(cfOptions, cfName));
            }
        }
        return result;
    }
378283
@Nonnull
	public static <T, R> LObjIntByteFunction<T, R> objIntByteFunctionFrom(Consumer<LObjIntByteFunctionBuilder<T, R>> buildingFunction) {
		LObjIntByteFunctionBuilder builder = new LObjIntByteFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1282660
@Nonnull
	public static LBoolToFltFunction boolToFltFunctionFrom(Consumer<LBoolToFltFunctionBuilder> buildingFunction) {
		LBoolToFltFunctionBuilder builder = new LBoolToFltFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
762410
private void onSetReadRepairChance(CfDef cfDef, Properties cfProperties, StringBuilder builder)
    {
        String dclocalReadRepairChance = cfProperties.getProperty(CassandraConstants.DCLOCAL_READ_REPAIR_CHANCE);
        if (dclocalReadRepairChance != null)
        {
            try
            {
                if (builder != null)
                {
                    appendPropertyToBuilder(builder, dclocalReadRepairChance,
                            CassandraConstants.DCLOCAL_READ_REPAIR_CHANCE);

                }
                else
                {
                    cfDef.setDclocal_read_repair_chance(Double.parseDouble(dclocalReadRepairChance));
                }
            }
            catch (NumberFormatException nfe)
            {
                log.error("READ_REPAIR_CHANCE should be double type, Caused by: {}.", nfe);
                throw new SchemaGenerationException(nfe);
            }
        }
    }