Skip to content

Instantly share code, notes, and snippets.

View lucamolteni's full-sized avatar
🏠
Working from home

Luca Molteni lucamolteni

🏠
Working from home
View GitHub Profile
package rules.rhoc;
import java.util.Map;
import org.drools.ruleops.model.Advice;
import io.fabric8.kubernetes.api.model.ConfigMap;
import io.fabric8.kubernetes.api.model.Pod;
global java.lang.String arg0;
@lucamolteni
lucamolteni / managed_connectors_with_kcat.md
Last active November 4, 2021 15:34
Steps to create a managed connector and interact with it with kcat

Use the _kafka_supporting user! in my case lmolteni_kafka_supporting on console.redhat.com

rhoas login
rhoas kafka list
rhoas kafka create --name=lucamolteni-managedconnector
rhoas kafka describe

wait for the kafka instance to be ready

This file has been truncated, but you can view the full file.
package org.kie.dmn.core.alphasupport.DMNAlphaNetwork_decision_45table428353122568939885.org.drools.ancompiler;
public class QuestoInveceSicheCompila extends org.drools.ancompiler.CompiledNetwork {
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Compiledorg_kie_dmn_core_compiler_alphanetbased_PropertyEvaluatorNetwork31636425726.class);
org.drools.core.spi.InternalReadAccessor readAccessor;
private org.drools.modelcompiler.constraints.LambdaConstraint lambdaConstraint4; // [AlphaNode(4) constraint=[Constraint for 'Age_62_610' (index: AlphaIndex #1 (EQUAL, left: lambda 1550937040, right: null)), ]]
private org.drools.core.rule.ContextEntry contextEntry4;
private org.drools.modelcompiler.constraints.LambdaConstraint lambdaConstraint5; // [AlphaNode(5) constraint=[Constraint for 'RiskCategory_34Medium_34_44_34Low_34' (index: null), ]]
private org.drools.core.rule.ContextEntry contextEntry5;
This file has been truncated, but you can view the full file.
package org.kie.dmn.core.alphasupport.DMNAlphaNetwork_decision_45table6282599943981996612.org.kie.dmn.core.alphasupport.DMNAlphaNetwork_decision_45table6282599943981996612.org.drools.ancompiler;
public class NonCompila extends org.drools.ancompiler.CompiledNetwork {
private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(Compiledorg_kie_dmn_core_compiler_alphanetbased_PropertyEvaluatorNetwork31636425726.class);
org.drools.core.spi.InternalReadAccessor readAccessor;
org.kie.dmn.core.compiler.alphanetbased.AlphaNetworkEvaluationContext ctx;
package defaultpkg;
import org.drools.modelcompiler.dsl.pattern.D;
import org.drools.model.Index.ConstraintType;
import java.util.Map;
import org.drools.modelcompiler.domain.Result;
import static defaultpkg.RulesC7D0E2EE8E0C2B2FC86E9EB8E86E6CF5.*;
public class RulesC7D0E2EE8E0C2B2FC86E9EB8E86E6CF5RuleMethods0 {
/*
* Copyright 2019 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@lucamolteni
lucamolteni / ANCBenchmark.java
Created April 26, 2021 13:22
propagate to terminal node
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
/*
* Copyright 2021 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
package org.example;
import java.lang.invoke.CallSite;
import java.lang.invoke.LambdaMetafactory;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.reflect.Method;
import java.util.concurrent.TimeUnit;
import java.util.function.IntSupplier;