fix injection problems with server select strategies

This commit is contained in:
fjy 2014-05-07 10:13:05 -07:00
parent dcab7efa1b
commit e7da1bb9ce
3 changed files with 13 additions and 10 deletions

View File

@ -1,8 +1,9 @@
package io.druid.client.selector;
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.google.api.client.util.Maps;
import com.google.common.primitives.Ints;
import com.google.inject.Inject;
import java.util.Comparator;
import java.util.Map;
@ -13,10 +14,10 @@ public class CustomTierSelectorStrategy extends AbstractTierSelectorStrategy
{
private final Comparator<Integer> comparator;
@Inject
@JsonCreator
public CustomTierSelectorStrategy(
ServerSelectorStrategy serverSelectorStrategy,
CustomTierSelectorStrategyConfig config
@JacksonInject ServerSelectorStrategy serverSelectorStrategy,
@JacksonInject CustomTierSelectorStrategyConfig config
)
{
super(serverSelectorStrategy);

View File

@ -19,8 +19,9 @@
package io.druid.client.selector;
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.google.common.primitives.Ints;
import com.google.inject.Inject;
import java.util.Comparator;
@ -37,8 +38,8 @@ public class HighestPriorityTierSelectorStrategy extends AbstractTierSelectorStr
}
};
@Inject
public HighestPriorityTierSelectorStrategy(ServerSelectorStrategy serverSelectorStrategy)
@JsonCreator
public HighestPriorityTierSelectorStrategy(@JacksonInject ServerSelectorStrategy serverSelectorStrategy)
{
super(serverSelectorStrategy);
}

View File

@ -19,8 +19,9 @@
package io.druid.client.selector;
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.google.common.primitives.Ints;
import com.google.inject.Inject;
import java.util.Comparator;
@ -37,8 +38,8 @@ public class LowestPriorityTierSelectorStrategy extends AbstractTierSelectorStra
}
};
@Inject
public LowestPriorityTierSelectorStrategy(ServerSelectorStrategy serverSelectorStrategy)
@JsonCreator
public LowestPriorityTierSelectorStrategy(@JacksonInject ServerSelectorStrategy serverSelectorStrategy)
{
super(serverSelectorStrategy);
}