On set bloom filter.

@param cfDef
the cf def
@param cfProperties
the cf properties
@param builder
the builder
970781
private void onSetBloomFilter(CfDef cfDef, Properties cfProperties, StringBuilder builder)
    {
        String bloomFilterFpChance = cfProperties.getProperty(CassandraConstants.BLOOM_FILTER_FP_CHANCE);
        if (bloomFilterFpChance != null)
        {
            try
            {
                if (builder != null)
                {
                    appendPropertyToBuilder(builder, bloomFilterFpChance, CassandraConstants.BLOOM_FILTER_FP_CHANCE);
                }
                else
                {
                    cfDef.setBloom_filter_fp_chance(Double.parseDouble(bloomFilterFpChance));
                }
            }
            catch (NumberFormatException nfe)
            {
                log.error("BLOOM_FILTER_FP_CHANCE should be double type, Caused by: .", nfe);
                throw new SchemaGenerationException(nfe);
            }
        }
    }
1124261
public static void setPropertyReference(BeanDefinitionBuilder builder, String beanReference, String propertyName) {
        if (StringUtils.hasText(beanReference)) {
            builder.addPropertyReference(propertyName, beanReference);
        }
    }
299296
protected void configureFactory(DocumentBuilderFactory dbf) {
    dbf.setValidating(true);
    dbf.setIgnoringComments(false);
    dbf.setIgnoringElementContentWhitespace(false);
    dbf.setNamespaceAware(true);
    protectAgainstXxeAttacks(dbf);
  }
516380
private void onSetGcGrace(CfDef cfDef, Properties cfProperties, StringBuilder builder)
    {
        String gcGraceSeconds = cfProperties.getProperty(CassandraConstants.GC_GRACE_SECONDS);
        if (gcGraceSeconds != null)
        {
            try
            {
                if (builder != null)
                {
                    appendPropertyToBuilder(builder, gcGraceSeconds, CassandraConstants.GC_GRACE_SECONDS);
                }
                else
                {
                    cfDef.setGc_grace_seconds(Integer.parseInt(gcGraceSeconds));
                }
            }
            catch (NumberFormatException nfe)
            {
                log.error("GC_GRACE_SECONDS should be numeric type, Caused by: .", nfe);
                throw new SchemaGenerationException(nfe);
            }
        }
    }
12540
protected void configureCompression(final T builder, final String name) {
        final GrpcChannelProperties properties = getPropertiesFor(name);
        if (properties.isFullStreamDecompression()) {
            builder.enableFullStreamDecompression();
        }
    }
855558
private CfDef updateCfDefAttributes(Tree statement, CfDef cfDefToUpdate)
    {
        CfDef cfDef = new CfDef(cfDefToUpdate);

        for (int i = 1; i < statement.getChildCount(); i += 2)
        {
            String currentArgument = statement.getChild(i).getText().toUpperCase();
            ColumnFamilyArgument mArgument = ColumnFamilyArgument.valueOf(currentArgument);
            String mValue = statement.getChild(i + 1).getText();

            switch(mArgument)
            {
            case COLUMN_TYPE:
                cfDef.setColumn_type(CliUtils.unescapeSQLString(mValue));
                break;
            case COMPARATOR:
                cfDef.setComparator_type(CliUtils.unescapeSQLString(mValue));
                break;
            case SUBCOMPARATOR:
                cfDef.setSubcomparator_type(CliUtils.unescapeSQLString(mValue));
                break;
            case COMMENT:
                cfDef.setComment(CliUtils.unescapeSQLString(mValue));
                break;
            case READ_REPAIR_CHANCE:
                double chance = Double.parseDouble(mValue);

                if (chance < 0 || chance > 1)
                    throw new RuntimeException("Error: read_repair_chance must be between 0 and 1.");

                cfDef.setRead_repair_chance(chance);
                break;
            case DCLOCAL_READ_REPAIR_CHANCE:
                double localChance = Double.parseDouble(mValue);

                if (localChance < 0 || localChance > 1)
                    throw new RuntimeException("Error: dclocal_read_repair_chance must be between 0 and 1.");

                cfDef.setDclocal_read_repair_chance(localChance);
                break;
            case GC_GRACE:
                cfDef.setGc_grace_seconds(Integer.parseInt(mValue));
                break;
            case COLUMN_METADATA:
                Tree arrayOfMetaAttributes = statement.getChild(i + 1);
                if (!arrayOfMetaAttributes.getText().equals("ARRAY"))
                    throw new RuntimeException("'column_metadata' format - [{ k:v, k:v, ..}, { ... }, ...]");
                cfDef.setColumn_metadata(getCFColumnMetaFromTree(cfDef, arrayOfMetaAttributes));
                break;
            case MEMTABLE_OPERATIONS:
                break;
            case MEMTABLE_THROUGHPUT:
                break;
            case DEFAULT_VALIDATION_CLASS:
                cfDef.setDefault_validation_class(CliUtils.unescapeSQLString(mValue));
                break;
            case MIN_COMPACTION_THRESHOLD:
                int threshold = Integer.parseInt(mValue);
                if (threshold <= 0)
                    throw new RuntimeException("Disabling compaction by setting min/max compaction thresholds to 0 has been deprecated, set compaction_strategy_options={'enabled':false} instead");
                cfDef.setMin_compaction_threshold(threshold);
                cfDef.putToCompaction_strategy_options(CFPropDefs.KW_MINCOMPACTIONTHRESHOLD, Integer.toString(threshold));
                break;
            case MAX_COMPACTION_THRESHOLD:
                threshold = Integer.parseInt(mValue);
                if (threshold <= 0)
                    throw new RuntimeException("Disabling compaction by setting min/max compaction thresholds to 0 has been deprecated, set compaction_strategy_options={'enabled':false} instead");
                cfDef.setMax_compaction_threshold(Integer.parseInt(mValue));
                cfDef.putToCompaction_strategy_options(CFPropDefs.KW_MAXCOMPACTIONTHRESHOLD, Integer.toString(threshold));
                break;
            case REPLICATE_ON_WRITE:
                cfDef.setReplicate_on_write(Boolean.parseBoolean(mValue));
                break;
            case KEY_VALIDATION_CLASS:
                cfDef.setKey_validation_class(CliUtils.unescapeSQLString(mValue));
                break;
            case COMPACTION_STRATEGY:
                cfDef.setCompaction_strategy(CliUtils.unescapeSQLString(mValue));
                break;
            case COMPACTION_STRATEGY_OPTIONS:
                cfDef.setCompaction_strategy_options(getStrategyOptionsFromTree(statement.getChild(i+1)));
                break;
            case COMPRESSION_OPTIONS:
                cfDef.setCompression_options(getStrategyOptionsFromTree(statement.getChild(i+1)));
                break;
            case BLOOM_FILTER_FP_CHANCE:
                cfDef.setBloom_filter_fp_chance(Double.parseDouble(mValue));
                break;
            case MEMTABLE_FLUSH_PERIOD_IN_MS:
                cfDef.setMemtable_flush_period_in_ms(Integer.parseInt(mValue));
                break;
            case CACHING:
                cfDef.setCaching(CliUtils.unescapeSQLString(mValue));
                break;
            case CELLS_PER_ROW_TO_CACHE:
                cfDef.setCells_per_row_to_cache(CliUtils.unescapeSQLString(mValue));
                break;
            case DEFAULT_TIME_TO_LIVE:
                cfDef.setDefault_time_to_live(Integer.parseInt(mValue));
                break;
            case INDEX_INTERVAL:
                cfDef.setIndex_interval(Integer.parseInt(mValue));
                break;
            case SPECULATIVE_RETRY:
                cfDef.setSpeculative_retry(CliUtils.unescapeSQLString(mValue));
                break;
            case POPULATE_IO_CACHE_ON_FLUSH:
                cfDef.setPopulate_io_cache_on_flush(Boolean.parseBoolean(mValue));
                break;
            default:
                //must match one of the above or we'd throw an exception at the valueOf statement above.
                assert(false);

            }
        }

        return cfDef;
    }
274227
def visitPairDef(self, ctx: jsgParser.PairDefContext):
        
        if ctx.name():          # Options 1 or 3
            self.visitChildren(ctx)
        else:
            self._type_reference = as_token(ctx)
            if ctx.ebnfSuffix():
                self.visit(ctx.ebnfSuffix())
1135269
public void setQueryParamsBuilds(QueryParamsBuilder queryParamsBuilder) {
		PreconditionUtil.assertNotNull("A query params builder must be provided, but is null", queryParamsBuilder);
		this.queryParamsBuilder = queryParamsBuilder;
		this.querySpecDeserializer = null;
	}
610755
void onBuildChildNode(Object childObject, EntityMetadata childMetadata, PersistenceDelegator delegator,
            PersistenceCache pc, Node node, Relation relation)
    {
        Node childNode = generate(childObject, delegator, pc, null);
        if (childNode != null)
        {
            assignNodeLinkProperty(node, relation, childNode);
        }
    }
709501
@Nonnull
	public static LByteToFltFunction byteToFltFunctionFrom(Consumer<LByteToFltFunctionBuilder> buildingFunction) {
		LByteToFltFunctionBuilder builder = new LByteToFltFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1133140
private void setForceField(String ffname, IChemObjectBuilder builder) throws CDKException {
        if (ffname == null) {
            ffname = "mm2";
        }
        try {
            forceFieldName = ffname;
            ffc.setForceFieldConfigurator(ffname, builder);
            parameterSet = ffc.getParameterSet();
        } catch (CDKException ex1) {
            logger.error("Problem with ForceField configuration due to>" + ex1.getMessage());
            logger.debug(ex1);
            throw new CDKException("Problem with ForceField configuration due to>" + ex1.getMessage(), ex1);
        }
    }
650513
@Nonnull
	public static LFltConsumer fltConsumerFrom(Consumer<LFltConsumerBuilder> buildingFunction) {
		LFltConsumerBuilder builder = new LFltConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
412264
public synchronized void merge(BloomFilter filter) {
        if (!this.matchesAll() && !filter.matchesAll()) {
            checkArgument(filter.data.length == this.data.length &&
                          filter.hashFuncs == this.hashFuncs &&
                          filter.nTweak == this.nTweak);
            for (int i = 0; i < data.length; i++)
                this.data[i] |= filter.data[i];
        } else {
            this.data = new byte[] {(byte) 0xff};
        }
    }
969998
protected boolean definePropertyBeanMethods(ClassFile cf,
                                                SyntheticProperty property)
    {
        TypeDesc propertyType = TypeDesc.forClass(property.getType());
        // Add property get method.
        final MethodInfo mi = cf.addMethod(Modifiers.PUBLIC_ABSTRACT,
                                           property.getReadMethodName(),
                                           propertyType,
                                           null);

        if (property.getName() != null) {
            // Define @Name
            Annotation ann = mi.addRuntimeVisibleAnnotation(TypeDesc.forClass(Name.class));
            ann.putMemberValue("value", property.getName());
        }

        if (property.isNullable()) {
            mi.addRuntimeVisibleAnnotation(TypeDesc.forClass(Nullable.class));
        }
        boolean versioned = false;
        if (property.isVersion()) {
            mi.addRuntimeVisibleAnnotation(TypeDesc.forClass(Version.class));
            versioned = true;
        }

        if (property.getAdapter() != null) {
            StorablePropertyAdapter adapter = property.getAdapter();
            Annotation ann = mi.addRuntimeVisibleAnnotation
                (TypeDesc.forClass(adapter.getAnnotation().getAnnotationType()));
            java.lang.annotation.Annotation jann = adapter.getAnnotation().getAnnotation();
            if (jann != null) {
                new AnnotationBuilder().visit(jann, ann);
            }
        }

        List<String> annotationDescs = property.getAccessorAnnotationDescriptors();
        if (annotationDescs != null && annotationDescs.size() > 0) {
            for (String desc : annotationDescs) {
                new AnnotationDescParser(desc) {
                    @Override
                    protected Annotation buildRootAnnotation(TypeDesc rootAnnotationType) {
                        return mi.addRuntimeVisibleAnnotation(rootAnnotationType);
                    }
                }.parse(null);
            }
        }

        // Add property set method.
        cf.addMethod(Modifiers.PUBLIC_ABSTRACT,
                     property.getWriteMethodName(),
                     null,
                     new TypeDesc[] { propertyType });

        return versioned;
    }
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);
            }
        }
    }
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);
            }
        }
    }
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);
            }
        }
    }