org.jooby.Env - java examples

Here are the examples of the java api org.jooby.Env taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

62 Examples 7

19 View Complete Implementation : TestExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
public void configureInner(Env env, Config conf, Binder binder) {
    binder.bind(ExecutionScope.clreplaced).toInstance(new ExecutionScope(timeout));
    bindElasticClient(env, conf, binder);
}

19 View Complete Implementation : BaseEpbModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindPlanValidator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(new TypeLiteral<PlanValidator<Plan, AsgQuery>>() {
            }).annotatedWith(named(PlanTracer.Validator.Provider.planValidatorParameter)).to(planValidator());
            this.bindConstant().annotatedWith(named(PlanTracer.Validator.Provider.planValidatorNameParameter)).to(M1PlanValidator.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<PlanValidator<Plan, AsgQuery>>() {
            }).toProvider(new TypeLiteral<PlanTracer.Validator.Provider<Plan, PlanDetailedCost, AsgQuery>>() {
            });
            this.expose(new TypeLiteral<PlanValidator<Plan, AsgQuery>>() {
            });
        }
    });
}

19 View Complete Implementation : KnowledgeModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region ModuleBase Implementation
@Override
protected void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    String indexName = conf.getString(conf.getString("replacedembly") + ".idGenerator_indexName");
    binder.bindConstant().annotatedWith(named(BasicIdGenerator.indexNameParameter)).to(indexName);
    binder.bind(new TypeLiteral<IdGeneratorDriver<Range>>() {
    }).to(BasicIdGenerator.clreplaced).asEagerSingleton();
    Multibinder<CompositeCursorFactory.Binding> bindingMultibinder = Multibinder.newSetBinder(binder, CompositeCursorFactory.Binding.clreplaced);
    // KnowledgeGraphHierarchyCursor
    bindingMultibinder.addBinding().toInstance(new CompositeCursorFactory.Binding(KnowledgeGraphHierarchyCursorRequest.CursorType, KnowledgeGraphHierarchyCursorRequest.clreplaced, new KnowledgeGraphHierarchyTraversalCursor.Factory()));
    // KnowledgeGraphHierarchyCursor
    bindingMultibinder.addBinding().toInstance(new CompositeCursorFactory.Binding(LogicalGraphCursorRequest.CursorType, LogicalGraphCursorRequest.clreplaced, new KnowledgeLogicalGraphCursor.Factory()));
    binder.bind(BusinessTypesProvider.clreplaced).toInstance(provider(conf));
    binder.bind(ExtensionQueryDriver.clreplaced).in(RequestScoped.clreplaced);
    binder.bind(KnowledgeExtensionQueryController.clreplaced).in(RequestScoped.clreplaced);
}

19 View Complete Implementation : CursorsModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region ModuleBase Implementation
@Override
protected void configureInner(Env env, Config config, Binder binder) throws Throwable {
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(CreatePathsCursorRequest.CursorType, CreatePathsCursorRequest.clreplaced, new PathsTraversalCursor.Factory()));
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(CreateForwardOnlyPathTraversalCursorRequest.CursorType, CreateForwardOnlyPathTraversalCursorRequest.clreplaced, new ForwardOnlyPathsTraversalCursor.Factory()));
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(CountCursorRequest.CursorType, CountCursorRequest.clreplaced, new CountTraversalCursor.Factory()));
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(FindPathTraversalCursorRequest.CursorType, FindPathTraversalCursorRequest.clreplaced, new FindPathsTraversalCursor.Factory()));
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(CreateGraphCursorRequest.CursorType, CreateGraphCursorRequest.clreplaced, new GraphTraversalCursor.Factory()));
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(CreateGraphHierarchyCursorRequest.CursorType, CreateGraphHierarchyCursorRequest.clreplaced, new NewGraphHierarchyTraversalCursor.Factory()));
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(CreateHierarchyFlattenCursorRequest.CursorType, CreateHierarchyFlattenCursorRequest.clreplaced, new HierarchyFlattenCursor.Factory()));
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(CreateInnerQueryCursorRequest.CursorType, CreateInnerQueryCursorRequest.clreplaced, new InnerQueryCursor.Factory()));
    Multibinder.newSetBinder(binder, Binding.clreplaced).addBinding().toInstance(new Binding(CreateCsvCursorRequest.CursorType, CreateCsvCursorRequest.clreplaced, new CsvTraversalCursor.Factory()));
}

19 View Complete Implementation : BaseEpbModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    bindPlanSearcher(env, conf, binder);
    bindPlanExtensionStrategy(env, conf, binder);
    bindPlanValidator(env, conf, binder);
    bindCostEstimator(env, conf, binder);
    bindPlanPruneStrategy(env, conf, binder);
    bindPlanSelector(env, conf, binder);
    binder.bind(new TypeLiteral<PlanTracer.Builder<Plan, PlanDetailedCost>>() {
    }).in(RequestScoped.clreplaced);
}

19 View Complete Implementation : DragonsModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
protected void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    String indexName = conf.getString(conf.getString("replacedembly") + ".idGenerator_indexName");
    binder.bindConstant().annotatedWith(named(BasicIdGenerator.indexNameParameter)).to(indexName);
    binder.bind(IndexProviderIfc.clreplaced).toInstance(getIndexProvider(conf));
    binder.bind(new TypeLiteral<IdGeneratorDriver<Range>>() {
    }).to(BasicIdGenerator.clreplaced).asEagerSingleton();
    binder.bind(EnreplacedyTransformer.clreplaced);
    Multibinder<CompositeCursorFactory.Binding> bindingMultibinder = Multibinder.newSetBinder(binder, CompositeCursorFactory.Binding.clreplaced);
    bindingMultibinder.addBinding().toInstance(new CompositeCursorFactory.Binding(LogicalGraphCursorRequest.CursorType, LogicalGraphCursorRequest.clreplaced, new LogicalGraphHierarchyTraversalCursor.Factory()));
// binder.bind(GraphLayoutProviderFactory.clreplaced).toInstance(new DragonsOntologyGraphLayoutProviderFactory(conf.getString("fuse.ontology_provider_dir")));
// binder.bind(DragonsExtensionQueryController.clreplaced).in(RequestScoped.clreplaced);
}

19 View Complete Implementation : BaseEpbModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindPlanSelector(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(new TypeLiteral<PlanSelector<PlanWithCost<Plan, PlanDetailedCost>, AsgQuery>>() {
            }).annotatedWith(named(PlanTracer.Selector.Provider.planSelectorParameter)).toInstance(localPlanSelector(conf));
            this.bindConstant().annotatedWith(named(PlanTracer.Selector.Provider.planSelectorNameParameter)).to("Local:" + AllCompletePlanSelector.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<PlanSelector<PlanWithCost<Plan, PlanDetailedCost>, AsgQuery>>() {
            }).annotatedWith(named(BottomUpPlanSearcher.localPlanSelectorParameter)).toProvider(new TypeLiteral<PlanTracer.Selector.Provider<Plan, PlanDetailedCost, AsgQuery>>() {
            });
            this.expose(new TypeLiteral<PlanSelector<PlanWithCost<Plan, PlanDetailedCost>, AsgQuery>>() {
            }).annotatedWith(named(BottomUpPlanSearcher.localPlanSelectorParameter));
        }
    });
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(new TypeLiteral<PlanSelector<PlanWithCost<Plan, PlanDetailedCost>, AsgQuery>>() {
            }).annotatedWith(named(PlanTracer.Selector.Provider.planSelectorParameter)).toInstance(globalPlanSelector(conf));
            this.bindConstant().annotatedWith(named(PlanTracer.Selector.Provider.planSelectorNameParameter)).to("Global:" + AllCompletePlanSelector.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<PlanSelector<PlanWithCost<Plan, PlanDetailedCost>, AsgQuery>>() {
            }).annotatedWith(named(BottomUpPlanSearcher.globalPlanSelectorParameter)).toProvider(new TypeLiteral<PlanTracer.Selector.Provider<Plan, PlanDetailedCost, AsgQuery>>() {
            });
            this.expose(new TypeLiteral<PlanSelector<PlanWithCost<Plan, PlanDetailedCost>, AsgQuery>>() {
            }).annotatedWith(named(BottomUpPlanSearcher.globalPlanSelectorParameter));
        }
    });
}

19 View Complete Implementation : DefaultIdGenModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
protected void configureInner(Env env, Config config, Binder binder) {
    binder.bind(new TypeLiteral<IdGeneratorDriver<Range>>() {
    }).toInstance(new IdGeneratorDriver<Range>() {

        @Override
        public Range getNext(String genName, int numIds) {
            return new Range(1l, 2l);
        }

        @Override
        public boolean init(List<String> names) {
            return true;
        }
    });
}

19 View Complete Implementation : BaseEpbModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindCostEstimator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorParameter)).toInstance(new DummyCostEstimator<>(new PlanDetailedCost()));
            this.bindConstant().annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorNameParameter)).to(DummyCostEstimator.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).toProvider(new TypeLiteral<PlanTracer.Estimator.Provider<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
            this.bind(StatisticsProviderFactory.clreplaced).to(NoStatsProvider.clreplaced);
            this.expose(StatisticsProviderFactory.clreplaced);
            this.expose(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
        }
    });
}

19 View Complete Implementation : PocModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region ModuleBase Implementation
@Override
protected void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    bindController(env, conf, binder);
}

19 View Complete Implementation : GtaModule.java
Copyright Apache License 2.0
Author : YANG-DB
// endregion
// region Private Methods
private void bindPlanTraversalTranslator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(PlanTraversalTranslator.clreplaced).annotatedWith(named(LoggingPlanTraversalTranslator.planTraversalTranslatorParameter)).to(getPlanTraversalTranslatorClreplaced(conf)).asEagerSingleton();
                this.bind(Logger.clreplaced).annotatedWith(named(LoggingPlanTraversalTranslator.loggerParameter)).toInstance(LoggerFactory.getLogger(getPlanTraversalTranslatorClreplaced(conf)));
                this.bind(PlanTraversalTranslator.clreplaced).to(LoggingPlanTraversalTranslator.clreplaced).asEagerSingleton();
                this.expose(PlanTraversalTranslator.clreplaced);
            } catch (ClreplacedNotFoundException e) {
                e.printStackTrace();
            }
        }
    });
}

19 View Complete Implementation : EpbDfsRuleBasedRedundantModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
protected void bindCostEstimator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(CostEstimationConfig.clreplaced).toInstance(new CostEstimationConfig(conf.getDouble("epb.cost.alpha"), conf.getDouble("epb.cost.delta")));
                this.bind(new TypeLiteral<PatternCostEstimator<Plan, CountEstimatesCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
                }).to(M1PatternCostEstimator.clreplaced).asEagerSingleton();
                this.bind(StatisticsProviderFactory.clreplaced).to(getStatisticsProviderFactory(conf)).asEagerSingleton();
                this.bind(new TypeLiteral<Predicate<Plan>>() {
                }).annotatedWith(named(PredicateCostEstimator.planPredicateParameter)).toInstance(plan -> plan.getOps().size() <= 2);
                this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
                }).annotatedWith(named(PredicateCostEstimator.trueCostEstimatorParameter)).to(RegexPatternCostEstimator.clreplaced).asEagerSingleton();
                this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
                }).annotatedWith(named(PredicateCostEstimator.falseCostEstimatorParameter)).toInstance((plan, context) -> new PlanWithCost<>(plan, context.getPreviousCost().get().getCost()));
                this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
                }).annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorParameter)).to(new TypeLiteral<PredicateCostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
                }).asEagerSingleton();
                this.bindConstant().annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorNameParameter)).to(PredicateCostEstimator.clreplaced.getSimpleName());
                this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
                }).toProvider(new TypeLiteral<PlanTracer.Estimator.Provider<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
                });
                this.expose(StatisticsProviderFactory.clreplaced);
                this.expose(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
                });
            } catch (ClreplacedNotFoundException e) {
                e.printStackTrace();
            }
        }
    });
}

19 View Complete Implementation : NewDispatcherModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    binder.bind(AppUrlSupplier.clreplaced).toInstance(getAppUrlSupplier(conf));
    binder.bind(OntologyProvider.clreplaced).toInstance(getOntologyProvider(conf));
    binder.bind(OntologyTransformerProvider.clreplaced).toInstance(getTransformerProvider(conf));
}

19 View Complete Implementation : CursorsModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region ModuleBase Implementation
@Override
protected void configureInner(Env env, Config config, Binder binder) throws Throwable {
    Multibinder.newSetBinder(binder, CompositeCursorFactory.Binding.clreplaced).addBinding().toInstance(new CompositeCursorFactory.Binding(CreatePathsCursorRequest.CursorType, CreatePathsCursorRequest.clreplaced, new TraversalCursor.Factory()));
}

19 View Complete Implementation : DescriptorsModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region ModuleBase Implementation
@Override
protected void configureInner(Env env, Config config, Binder binder) throws Throwable {
    binder.bind(new TypeLiteral<Descriptor<Query>>() {
    }).to(QueryDescriptor.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<Descriptor<AsgQuery>>() {
    }).to(AsgQueryDescriptor.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<Descriptor<Iterable<PlanOp>>>() {
    }).toInstance(IterablePlanOpDescriptor.getFull());
    binder.bind(new TypeLiteral<Descriptor<CompositePlanOp>>() {
    }).to(CompositePlanOpDescriptor.clreplaced);
    binder.bind(new TypeLiteral<Descriptor<PlanWithCost<Plan, PlanDetailedCost>>>() {
    }).toInstance(new PlanWithCostDescriptor<>(new CompositePlanOpDescriptor(gereplacederablePlanOpDescriptor(IterablePlanOpDescriptor.Mode.full)), new ToStringDescriptor<>()));
    /*binder.bind(new TypeLiteral<Descriptor<PlanWithCost<Plan, PlanDetailedCost>>>(){})
                .toInstance(new PlanWithCostDescriptor<>(
                        new CompositePlanOpDescriptor(IterablePlanOpDescriptor.getFull()),
                        new ToStringDescriptor<>()));*/
    binder.bind(new TypeLiteral<Descriptor<GraphTraversal<?, ?>>>() {
    }).to(GraphTraversalDescriptor.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<Descriptor<QueryResource>>() {
    }).to(QueryResourceDescriptor.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<Descriptor<CursorResource>>() {
    }).to(CursorResourceDescriptor.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<Descriptor<PageResource>>() {
    }).to(PageResourceDescriptor.clreplaced).asEagerSingleton();
}

19 View Complete Implementation : TestExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindElasticClient(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            boolean createMock = conf.hasPath("fuse.elasticsearch.mock") && conf.getBoolean("fuse.elasticsearch.mock");
            this.bindConstant().annotatedWith(named(ClientProvider.createMockParameter)).to(createMock);
            this.bind(Client.clreplaced).annotatedWith(named(LoggingClient.clientParameter)).toProvider(new MockClientProvider(mockSleepTime)).asEagerSingleton();
            this.bind(Logger.clreplaced).annotatedWith(named(LoggingClient.loggerParameter)).toInstance(LoggerFactory.getLogger(LoggingClient.clreplaced));
            this.bind(Client.clreplaced).to(TimeoutClientAdvisor.clreplaced);
            this.expose(Client.clreplaced);
        }
    });
}

19 View Complete Implementation : EpbMockModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
protected void configureInner(Env env, Config config, Binder binder) throws Throwable {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(new TypeLiteral<PlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            }).toInstance(query -> plan);
            this.bind(StatisticsProviderFactory.clreplaced).to(NoStatsProvider.clreplaced);
            this.expose(StatisticsProviderFactory.clreplaced);
            this.expose(new TypeLiteral<PlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            });
        }
    });
}

19 View Complete Implementation : BaseEpbModule.java
Copyright Apache License 2.0
Author : YANG-DB
private void bindPlanSearcher(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(new TypeLiteral<PlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            }).annotatedWith(named(UnionPlanSearcher.planSearcherParameter)).to(new TypeLiteral<BottomUpPlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            });
            this.bind(new TypeLiteral<PlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            }).annotatedWith(named(LoggingPlanSearcher.planSearcherParameter)).to(new TypeLiteral<UnionPlanSearcher>() {
            });
            this.bind(Logger.clreplaced).annotatedWith(named(LoggingPlanSearcher.loggerParameter)).toInstance(LoggerFactory.getLogger(UnionPlanSearcher.clreplaced));
            this.bind(new TypeLiteral<PlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            }).annotatedWith(named(PlanTracer.Searcher.Provider.planSearcherParameter)).to(new TypeLiteral<LoggingPlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            });
            this.bindConstant().annotatedWith(named(PlanTracer.Searcher.Provider.planSearcherNameParameter)).to(UnionPlanSearcher.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<PlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            }).toProvider(new TypeLiteral<PlanTracer.Searcher.Provider<Plan, PlanDetailedCost, AsgQuery>>() {
            });
            this.expose(new TypeLiteral<PlanSearcher<Plan, PlanDetailedCost, AsgQuery>>() {
            });
        }
    });
}

19 View Complete Implementation : MaxMindApi.java
Copyright MIT License
Author : maxdemarzi
@Override
public void configure(Env env, Config conf, Binder binder) throws Throwable {
    ClreplacedLoader clreplacedLoader = getClreplaced().getClreplacedLoader();
    File database = new File(clreplacedLoader.getResource("com/maxdemarzi/GeoLite2-City.mmdb").getFile());
    // A File object pointing to your GeoIP2 or GeoLite2 database
    // File database = new File("/com/maxdemarzi/GeoIP2-City.mmdb");
    // This creates the DatabaseReader object. To improve performance, reuse
    // the object across lookups. The object is thread-safe.
    reader = new DatabaseReader.Builder(database).withCache(new CHMCache()).build();
}

19 View Complete Implementation : BaseEpbModule.java
Copyright Apache License 2.0
Author : YANG-DB
private void bindPlanPruneStrategy(Env env, Config conf, Binder binder) {
    localPruner(binder, conf);
    globalPruner(binder, conf);
}

19 View Complete Implementation : PocModule.java
Copyright Apache License 2.0
Author : YANG-DB
private void bindController(Env env, Config config, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(new TypeLiteral<Cache<String, Graph>>() {
            }).toInstance(Caffeine.newBuilder().expireAfterAccess(Duration.ofMinutes(10)).maximumSize(10000).build());
            this.bind(PocGraphController.clreplaced).to(StandardPocGraphController.clreplaced);
            this.expose(PocGraphController.clreplaced);
        }
    });
}

19 View Complete Implementation : BaseEpbModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindPlanExtensionStrategy(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(new TypeLiteral<PlanExtensionStrategy<Plan, AsgQuery>>() {
                }).annotatedWith(named(PlanTracer.ExtensionStrategy.Provider.planExtensionStrategyParameter)).to(planExtensionStrategy(conf));
                this.bindConstant().annotatedWith(named(PlanTracer.ExtensionStrategy.Provider.planExtensionStrategyNameParameter)).to(M1DfsRedundantPlanExtensionStrategy.clreplaced.getSimpleName());
                this.bind(new TypeLiteral<PlanExtensionStrategy<Plan, AsgQuery>>() {
                }).toProvider(new TypeLiteral<PlanTracer.ExtensionStrategy.Provider<Plan, PlanDetailedCost, AsgQuery>>() {
                });
                this.expose(new TypeLiteral<PlanExtensionStrategy<Plan, AsgQuery>>() {
                });
            } catch (ClreplacedNotFoundException e) {
                e.printStackTrace();
            }
        }
    });
}

19 View Complete Implementation : BunnyApi.java
Copyright MIT License
Author : maxdemarzi
@Override
public void configure(Env env, Config conf, Binder binder) throws Throwable {
    // Add AccessKey header
    OkHttpClient.Builder builder = new OkHttpClient.Builder();
    builder.addInterceptor(chain -> chain.proceed(chain.request().newBuilder().addHeader("AccessKey", conf.getString("bunny.key")).addHeader("Content-Type", "application/octet-stream").build()));
    OkHttpClient client = builder.build();
    Retrofit retrofit = new Retrofit.Builder().client(client).baseUrl("https://storage.bunnycdn.com/").addConverterFactory(JacksonConverterFactory.create()).build();
    BunnyCDN bunny = retrofit.create(BunnyCDN.clreplaced);
    binder.bind(BunnyCDN.clreplaced).toInstance(bunny);
}

19 View Complete Implementation : EpbDfsCountBasedRedundantModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
protected void bindCostEstimator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            IterablePlanOpDescriptor iterablePlanOpDescriptor = new IterablePlanOpDescriptor(IterablePlanOpDescriptor.Mode.full, null);
            Map<Clreplaced<?>, Descriptor<? extends PlanOp>> descriptors = new HashMap<>();
            descriptors.put(EnreplacedyOp.clreplaced, new EnreplacedyOpDescriptor());
            descriptors.put(EnreplacedyFilterOp.clreplaced, new EnreplacedyFilterOpDescriptor());
            iterablePlanOpDescriptor.setCompositeDescriptor(new CompositeDescriptor<>(descriptors, new ToStringDescriptor<>()));
            this.bind(new TypeLiteral<Descriptor<Plan>>() {
            }).annotatedWith(named(CachedCostEstimator.descriptorParameter)).toInstance((plan) -> iterablePlanOpDescriptor.describe(plan.getOps()));
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).annotatedWith(named(CachedCostEstimator.costEstimatorParameter)).to(CountCostEstimator.clreplaced);
            this.bind(new TypeLiteral<Cache<String, PlanDetailedCost>>() {
            }).annotatedWith(named(CachedCostEstimator.cacheParameter)).toInstance(Caffeine.newBuilder().expireAfterAccess(Duration.ofMinutes(10)).maximumSize(10000).build());
            this.bind(new TypeLiteral<Predicate<Plan>>() {
            }).annotatedWith(named(PredicateCostEstimator.planPredicateParameter)).toInstance(plan -> plan.getOps().size() <= 2);
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).annotatedWith(named(PredicateCostEstimator.trueCostEstimatorParameter)).to(new TypeLiteral<CachedCostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).annotatedWith(named(PredicateCostEstimator.falseCostEstimatorParameter)).toInstance((plan, context) -> new PlanWithCost<>(plan, context.getPreviousCost().get().getCost()));
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorParameter)).to(new TypeLiteral<PredicateCostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
            this.bindConstant().annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorNameParameter)).to(PredicateCostEstimator.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).toProvider(new TypeLiteral<PlanTracer.Estimator.Provider<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
            try {
                this.bind(StatisticsProviderFactory.clreplaced).to(getStatisticsProviderFactory(conf)).asEagerSingleton();
            } catch (ClreplacedNotFoundException e) {
                e.printStackTrace();
            }
            this.expose(StatisticsProviderFactory.clreplaced);
            this.expose(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
        }
    });
}

19 View Complete Implementation : M2AsgModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region ModuleBase Implementation
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    binder.bind(CypherAsgStrategyRegistrar.clreplaced).to(M1CypherAsgStrategyRegistrar.clreplaced).asEagerSingleton();
    binder.bind(AsgStrategyRegistrar.clreplaced).to(getAsgStrategyRegistrar(conf));
    binder.bind(new TypeLiteral<QueryTransformer<Query, AsgQuery>>() {
    }).to(QueryToCompositeAsgTransformer.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<QueryTransformer<String, AsgQuery>>() {
    }).to(AsgCypherTransformer.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<QueryTransformer<AsgQuery, AsgQuery>>() {
    }).to(AsgQueryTransformer.clreplaced);
}

19 View Complete Implementation : EpbModuleM2CountBased.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindCostEstimator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(StatisticsProviderFactory.clreplaced).to(ElasticCountStatisticsProviderFactory.clreplaced).asEagerSingleton();
            this.bind(CostEstimationConfig.clreplaced).toInstance(new CostEstimationConfig(conf.getDouble("epb.cost.alpha"), conf.getDouble("epb.cost.delta")));
            this.bind(new TypeLiteral<PatternCostEstimator<Plan, CountEstimatesCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).to(M2PatternCostEstimator.clreplaced).asEagerSingleton();
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorParameter)).to(RegexPatternCostEstimator.clreplaced).asEagerSingleton();
            this.bindConstant().annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorNameParameter)).to(RegexPatternCostEstimator.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).toProvider(new TypeLiteral<PlanTracer.Estimator.Provider<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
            this.expose(StatisticsProviderFactory.clreplaced);
            this.expose(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
        }
    });
}

19 View Complete Implementation : EpbModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindCostEstimator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(StatConfig.clreplaced).toInstance(new StatConfig(conf));
            this.bind(GraphStatisticsProvider.clreplaced).to(ElasticStatisticsGraphProvider.clreplaced).asEagerSingleton();
            this.bind(StatDataProvider.clreplaced).to(ElasticStatDoreplacedentProvider.clreplaced).asEagerSingleton();
            this.bind(StatisticsProviderFactory.clreplaced).to(EBaseStatisticsProviderFactory.clreplaced).asEagerSingleton();
            this.bind(CostEstimationConfig.clreplaced).toInstance(new CostEstimationConfig(conf.getDouble("epb.cost.alpha"), conf.getDouble("epb.cost.delta")));
            this.bind(new TypeLiteral<PatternCostEstimator<Plan, CountEstimatesCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).to(M1PatternCostEstimator.clreplaced).asEagerSingleton();
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorParameter)).to(RegexPatternCostEstimator.clreplaced).asEagerSingleton();
            this.bindConstant().annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorNameParameter)).to(RegexPatternCostEstimator.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).toProvider(new TypeLiteral<PlanTracer.Estimator.Provider<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
            this.expose(StatisticsProviderFactory.clreplaced);
            this.expose(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
        }
    });
}

19 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region Jooby.Module Implementation
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    bindGraphWriters(env, conf, binder);
    bindResourceManager(env, conf, binder);
    bindGraphInitiator(env, conf, binder);
    bindGraphDataLoader(env, conf, binder);
    bindCSVDataLoader(env, conf, binder);
    bindCursorFactory(env, conf, binder);
    bindElasticClient(env, conf, binder);
    bindRawSchema(env, conf, binder);
    bindSchemaProviderFactory(env, conf, binder);
    bindUniGraphProvider(env, conf, binder);
    binder.bind(QueryDriver.clreplaced).to(StandardQueryDriver.clreplaced).in(RequestScoped.clreplaced);
    binder.bind(CursorDriver.clreplaced).to(StandardCursorDriver.clreplaced).in(RequestScoped.clreplaced);
    binder.bind(PageDriver.clreplaced).to(StandardPageDriver.clreplaced).in(RequestScoped.clreplaced);
    binder.bind(SearchOrderProviderFactory.clreplaced).to(getSearchOrderProvider(conf));
}

19 View Complete Implementation : GtaModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region ModuleBase Implementation
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    bindPlanTraversalTranslator(env, conf, binder);
}

19 View Complete Implementation : AsgValidationModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    Clreplaced<? extends AsgValidatorStrategyRegistrar> asgValidatorStrategyRegistrar = AsgValidatorStrategyRegistrarImpl.clreplaced;
    try {
        asgValidatorStrategyRegistrar = getAsgValidatorStrategyRegistrar(conf);
    } catch (Throwable e) {
    // failed binding to external clreplaced - use default
    }
    binder.bind(AsgValidatorStrategyRegistrar.clreplaced).to(asgValidatorStrategyRegistrar).asEagerSingleton();
    binder.bind(new TypeLiteral<QueryValidator<AsgQuery>>() {
    }).to(AsgQueryValidator.clreplaced).asEagerSingleton();
}

19 View Complete Implementation : AsgModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    binder.bind(AsgStrategyRegistrar.clreplaced).to(M1AsgStrategyRegistrar.clreplaced).asEagerSingleton();
    binder.bind(CypherAsgStrategyRegistrar.clreplaced).to(M1CypherAsgStrategyRegistrar.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<QueryTransformer<Query, AsgQuery>>() {
    }).to(QueryToCompositeAsgTransformer.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<QueryTransformer<String, AsgQuery>>() {
    }).to(AsgCypherTransformer.clreplaced).asEagerSingleton();
    binder.bind(new TypeLiteral<QueryTransformer<AsgQuery, AsgQuery>>() {
    }).to(AsgQueryTransformer.clreplaced).asEagerSingleton();
}

19 View Complete Implementation : ModuleBase.java
Copyright Apache License 2.0
Author : YANG-DB
// region Module Implementation
@Override
public void configure(Env env, Config config, Binder binder) throws Throwable {
    List<String> modules = config.getStringList("modules." + config.getString("application.profile"));
    if (modules.contains(this.getClreplaced().getName())) {
        configureInner(env, config, binder);
    }
}

19 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
// endregion
// region Private Methods
protected void bindGraphWriters(Env env, Config conf, Binder binder) {
    binder.bind(GraphWriterStrategy.clreplaced).toInstance(new GraphWriterStrategy());
}

19 View Complete Implementation : EpbModuleM2.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindCostEstimator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(StatConfig.clreplaced).toInstance(new StatConfig(conf));
            this.bind(GraphStatisticsProvider.clreplaced).to(ElasticStatisticsGraphProvider.clreplaced).asEagerSingleton();
            this.bind(StatDataProvider.clreplaced).to(ElasticStatDoreplacedentProvider.clreplaced).asEagerSingleton();
            this.bind(StatisticsProviderFactory.clreplaced).to(EBaseStatisticsProviderFactory.clreplaced).asEagerSingleton();
            this.bind(CostEstimationConfig.clreplaced).toInstance(new CostEstimationConfig(conf.getDouble("epb.cost.alpha"), conf.getDouble("epb.cost.delta")));
            this.bind(new TypeLiteral<PatternCostEstimator<Plan, CountEstimatesCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).to(M2PatternCostEstimator.clreplaced).asEagerSingleton();
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorParameter)).to(RegexPatternCostEstimator.clreplaced).asEagerSingleton();
            this.bindConstant().annotatedWith(named(PlanTracer.Estimator.Provider.costEstimatorNameParameter)).to(RegexPatternCostEstimator.clreplaced.getSimpleName());
            this.bind(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            }).toProvider(new TypeLiteral<PlanTracer.Estimator.Provider<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
            this.expose(StatisticsProviderFactory.clreplaced);
            this.expose(new TypeLiteral<CostEstimator<Plan, PlanDetailedCost, IncrementalEstimationContext<Plan, PlanDetailedCost, AsgQuery>>>() {
            });
        }
    });
}

18 View Complete Implementation : DriverTestModule.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    binder.bind(ResourceStore.clreplaced).toInstance(new InMemoryResourceStore());
    binder.bind(QueryDriver.clreplaced).to(MockDriver.Query.clreplaced).in(RequestScoped.clreplaced);
    binder.bind(CursorDriver.clreplaced).to(MockDriver.Cursor.clreplaced).in(RequestScoped.clreplaced);
    binder.bind(PageDriver.clreplaced).to(MockDriver.Page.clreplaced).in(RequestScoped.clreplaced);
    binder.bind(GraphElementSchemaProviderFactory.clreplaced).toInstance(ontology -> new OntologySchemaProvider(ontology, new M2DragonsPhysicalSchemaProvider()));
    binder.bind(Client.clreplaced).toInstance(new MockClient());
    InitialTestDataLoader loader = new InitialTestDataLoader(null, null);
    binder.bind(GraphDataLoader.clreplaced).toInstance(loader);
    binder.bind(CSVDataLoader.clreplaced).toInstance(loader);
    binder.bind(GraphInitiator.clreplaced).toInstance(new VoidGraphInitiator());
    Multibinder.newSetBinder(binder, CompositeCursorFactory.Binding.clreplaced).addBinding().toInstance(new CompositeCursorFactory.Binding(CreatePathsCursorRequest.CursorType, CreatePathsCursorRequest.clreplaced, new PathsTraversalCursor.Factory()));
    Multibinder.newSetBinder(binder, CompositeCursorFactory.Binding.clreplaced).addBinding().toInstance(new CompositeCursorFactory.Binding(CreateGraphCursorRequest.CursorType, CreateGraphCursorRequest.clreplaced, new GraphTraversalCursor.Factory()));
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindSchemaProviderFactory(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(GraphElementSchemaProviderFactory.clreplaced).annotatedWith(named(OntologyGraphElementSchemaProviderFactory.schemaProviderFactoryParameter)).to(getSchemaProviderFactoryClreplaced(conf));
                this.bind(GraphElementSchemaProviderFactory.clreplaced).annotatedWith(named(CachedGraphElementSchemaProviderFactory.schemaProviderFactoryParameter)).to(OntologyGraphElementSchemaProviderFactory.clreplaced);
                /*this.bind(Logger.clreplaced)
                            .annotatedWith(named(LoggingGraphElementSchemaProviderFactory.warnLoggerParameter))
                            .toInstance(LoggerFactory.getLogger(GraphElementSchemaProvider.clreplaced));
                    this.bind(Logger.clreplaced)
                            .annotatedWith(named(LoggingGraphElementSchemaProviderFactory.verboseLoggerParameter))
                            .toInstance(LoggerFactory.getLogger(GraphElementSchemaProvider.clreplaced.getName() + ".Verbose"));
                    this.bind(GraphElementSchemaProviderFactory.clreplaced)
                            .to(LoggingGraphElementSchemaProviderFactory.clreplaced);*/
                this.bind(GraphElementSchemaProviderFactory.clreplaced).to(CachedGraphElementSchemaProviderFactory.clreplaced).asEagerSingleton();
                this.expose(GraphElementSchemaProviderFactory.clreplaced);
            } catch (ClreplacedNotFoundException e) {
                e.printStackTrace();
            }
        }
    });
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindUniGraphProvider(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(UniGraphConfiguration.clreplaced).toInstance(createUniGraphConfiguration(conf));
                this.bind(UniGraphProvider.clreplaced).to(getUniGraphProviderClreplaced(conf)).in(RequestScoped.clreplaced);
                this.expose(UniGraphProvider.clreplaced);
            } catch (ClreplacedNotFoundException e) {
                e.printStackTrace();
            }
        }
    });
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindGraphInitiator(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(GraphInitiator.clreplaced).to(getGraphInitiator(conf));
                this.expose(GraphInitiator.clreplaced);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    });
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindRawSchema(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(RawSchema.clreplaced).annotatedWith(named(PrefixedRawSchema.rawSchemaParameter)).to(getRawElasticSchemaClreplaced(conf)).asEagerSingleton();
                String prefix = conf.hasPath(conf.getString("replacedembly") + ".physical_raw_schema_prefix") ? conf.getString(conf.getString("replacedembly") + ".physical_raw_schema_prefix") : "";
                this.bindConstant().annotatedWith(named(PrefixedRawSchema.prefixParameter)).to(prefix);
                this.bind(IndicesProvider.clreplaced).annotatedWith(named(CachedRawSchema.systemIndicesParameter)).to(SystemIndicesProvider.clreplaced).asEagerSingleton();
                this.bind(RawSchema.clreplaced).annotatedWith(named(ParreplacedionFilteredRawSchema.rawSchemaParameter)).to(PrefixedRawSchema.clreplaced).asEagerSingleton();
                this.bind(RawSchema.clreplaced).annotatedWith(named(CachedRawSchema.rawSchemaParameter)).to(ParreplacedionFilteredRawSchema.clreplaced).asEagerSingleton();
                this.bind(RawSchema.clreplaced).to(CachedRawSchema.clreplaced).asEagerSingleton();
                this.expose(RawSchema.clreplaced);
            } catch (ClreplacedNotFoundException e) {
                e.printStackTrace();
            }
        }
    });
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindGraphDataLoader(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(GraphDataLoader.clreplaced).to(getGraphDataLoader(conf));
                this.expose(GraphDataLoader.clreplaced);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    });
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindCSVDataLoader(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            try {
                this.bind(CSVDataLoader.clreplaced).to(getCSVDataLoader(conf));
                this.expose(CSVDataLoader.clreplaced);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    });
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindResourceManager(Env env, Config conf, Binder binder) {
    // resource store and persist processor
    binder.bind(ResourceStore.clreplaced).annotatedWith(Names.named(ResourceStoreFactory.injectionName)).to(PersistantResourceStore.clreplaced).in(new SingletonScope());
    binder.bind(ResourceStore.clreplaced).annotatedWith(Names.named(LoggingResourceStore.injectionName)).to(ResourceStoreFactory.clreplaced).in(new SingletonScope());
    binder.bind(ResourceStore.clreplaced).to(LoggingResourceStore.clreplaced).in(new SingletonScope());
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindCursorFactory(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(CursorFactory.clreplaced).annotatedWith(named(LoggingCursorFactory.cursorFactoryParameter)).to(CompositeCursorFactory.clreplaced).asEagerSingleton();
            this.bind(Logger.clreplaced).annotatedWith(named(LoggingCursorFactory.cursorLoggerParameter)).toInstance(LoggerFactory.getLogger(Cursor.clreplaced));
            this.bind(Logger.clreplaced).annotatedWith(named(LoggingCursorFactory.traversalLoggerParameter)).toInstance(LoggerFactory.getLogger(Traversal.clreplaced));
            this.bind(CursorFactory.clreplaced).to(LoggingCursorFactory.clreplaced).asEagerSingleton();
            this.expose(CursorFactory.clreplaced);
        }
    });
}

18 View Complete Implementation : ExecutorModule.java
Copyright Apache License 2.0
Author : YANG-DB
protected void bindElasticClient(Env env, Config conf, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            boolean createMock = conf.hasPath("fuse.elasticsearch.mock") && conf.getBoolean("fuse.elasticsearch.mock");
            ElasticGraphConfiguration elasticGraphConfiguration = createElasticGraphConfiguration(conf);
            this.bind(ElasticGraphConfiguration.clreplaced).toInstance(elasticGraphConfiguration);
            ClientProvider provider = new ClientProvider(createMock, elasticGraphConfiguration);
            Client client = provider.get();
            this.bindConstant().annotatedWith(named(ClientProvider.createMockParameter)).to(createMock);
            this.bind(Client.clreplaced).annotatedWith(named(LoggingClient.clientParameter)).toInstance(client);
            // .toProvider(ClientProvider.clreplaced).asEagerSingleton();
            this.bind(Logger.clreplaced).annotatedWith(named(LoggingClient.loggerParameter)).toInstance(LoggerFactory.getLogger(LoggingClient.clreplaced));
            this.bind(Client.clreplaced).to(TimeoutClientAdvisor.clreplaced).in(RequestScoped.clreplaced);
            this.bind(Client.clreplaced).annotatedWith(named(globalClient)).toInstance(client);
            this.expose(Client.clreplaced);
            this.expose(Client.clreplaced).annotatedWith(named(globalClient));
            this.expose(ElasticGraphConfiguration.clreplaced);
        }
    });
}

18 View Complete Implementation : GtaFilterModule.java
Copyright Apache License 2.0
Author : YANG-DB
// region ModuleBase Implementation
@Override
public void configureInner(Env env, Config conf, Binder binder) throws Throwable {
    binder.bind(PlanTraversalTranslator.clreplaced).annotatedWith(Names.named(LoggingPlanTraversalTranslator.planTraversalTranslatorParameter)).to(M1FilterPlanTraversalTranslator.clreplaced).asEagerSingleton();
    binder.bind(Logger.clreplaced).annotatedWith(named(LoggingPlanTraversalTranslator.loggerParameter)).toInstance(LoggerFactory.getLogger(M1FilterPlanTraversalTranslator.clreplaced));
    binder.bind(PlanTraversalTranslator.clreplaced).to(LoggingPlanTraversalTranslator.clreplaced).asEagerSingleton();
}

18 View Complete Implementation : Bootstrap.java
Copyright Apache License 2.0
Author : YANG-DB
private void loadModules(Env env, Config conf, Binder binder) {
    String profile = conf.getString("application.profile");
    System.out.println("Active Profile " + profile);
    System.out.println("Loading modules: " + "modules." + profile);
    List<String> modules = conf.getStringList("modules." + profile);
    modules.forEach(value -> {
        try {
            Method method = Jooby.Module.clreplaced.getMethod("configure", Env.clreplaced, Config.clreplaced, Binder.clreplaced);
            method.invoke(Clreplaced.forName(value).newInstance(), env, conf, binder);
        } catch (Exception e) {
            // todo something usefull here - sbould the app break ???
            e.printStackTrace();
        }
    });
}

17 View Complete Implementation : BaseModuleInjectionTest.java
Copyright Apache License 2.0
Author : YANG-DB
public RequestScope setup() {
    Env env = Mockito.mock(Env.clreplaced);
    Mockito.when(env.config()).thenAnswer(invocation -> config);
    final RequestScope requestScope = new RequestScope();
    requestScope.enter(new HashMap<>());
    injector = Guice.createInjector(new AbstractModule() {

        @Override
        protected void configure() {
            try {
                // bind annotation to request scope
                this.binder().bind(Config.clreplaced).toInstance(config);
                this.binder().bindScope(RequestScoped.clreplaced, requestScope);
                modules.forEach(m -> {
                    try {
                        m.configure(env, config, this.binder());
                    } catch (Throwable throwable) {
                        throwable.printStackTrace();
                    }
                });
            } catch (Throwable throwable) {
                throwable.printStackTrace();
            }
        }
    });
    injector.injectMembers(this);
    return requestScope;
}

17 View Complete Implementation : Bootstrap.java
Copyright Apache License 2.0
Author : YANG-DB
@Override
public void configure(Env env, Config conf, Binder binder) throws Throwable {
    binder.bindInterceptor(Matchers.any(), Matchers.annotatedWith(TimerAnnotation.clreplaced), new PerformanceStatistics(binder.getProvider(MetricRegistry.clreplaced)));
    // load modules according getTo configuration
    loadModules(env, conf, binder);
}

17 View Complete Implementation : ServiceModule.java
Copyright Apache License 2.0
Author : YANG-DB
private void bindDashboardController(Env env, Config config, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(DashboardController.clreplaced).to(StandardDashboardController.clreplaced);
            this.expose(DashboardController.clreplaced);
        }
    });
}

17 View Complete Implementation : ServiceModule.java
Copyright Apache License 2.0
Author : YANG-DB
private void bindQueryController(Env env, Config config, Binder binder) {
    binder.install(new PrivateModule() {

        @Override
        protected void configure() {
            this.bind(CursorController.clreplaced).annotatedWith(named(StandardQueryController.cursorControllerParameter)).to(StandardCursorController.clreplaced);
            this.bind(PageController.clreplaced).annotatedWith(named(StandardQueryController.pageControllerParameter)).to(StandardPageController.clreplaced);
            this.bind(QueryController.clreplaced).annotatedWith(named(LoggingQueryController.controllerParameter)).to(StandardQueryController.clreplaced);
            this.bind(Logger.clreplaced).annotatedWith(named(LoggingQueryController.loggerParameter)).toInstance(LoggerFactory.getLogger(StandardQueryController.clreplaced));
            this.bind(new TypeLiteral<Descriptor<Query>>() {
            }).annotatedWith(named(LoggingQueryController.queryDescriptorParameter)).to(JacksonQueryDescriptor.clreplaced).asEagerSingleton();
            this.bind(QueryController.clreplaced).to(LoggingQueryController.clreplaced);
            this.expose(QueryController.clreplaced);
        }
    });
}