mirror of https://github.com/apache/druid.git
62edbab434
Usage example: ConditionalMultibind.create(props, binder, Animal.class) .conditionBinder("animal.type", Predicates.equalTo("cat"), Cat.class) .conditionBinder("animal.type", Predicates.equalTo("dog"), Dog.class); At binding time, this will check the value set for property "animal.type" in props. If the value is "cat", it will add a binding to Cat.class. If the value is "dog", it will add a binding to Dog.class. At ingestion time, you will get the items that satisfy their corresponding predicates by calling injector.getInstance(Key.get(new TypeLiteral<Set<Animal>>(){})) |
||
---|---|---|
.. | ||
src | ||
pom.xml |