EnabledInstanceFilter class isn't needed
Project: http://git-wip-us.apache.org/repos/asf/curator/repo Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/467513b3 Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/467513b3 Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/467513b3 Branch: refs/heads/master Commit: 467513b3d5b6eb1e16b5ee9693ed09a6f703ccf5 Parents: 27d3b10 Author: randgalt <randg...@apache.org> Authored: Mon Jan 23 21:06:46 2017 -0500 Committer: randgalt <randg...@apache.org> Committed: Mon Jan 23 21:06:46 2017 -0500 ---------------------------------------------------------------------- .../curator/x/discovery/details/ServiceProviderImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/curator/blob/467513b3/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceProviderImpl.java ---------------------------------------------------------------------- diff --git a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceProviderImpl.java b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceProviderImpl.java index 4cbd126..2ab1434 100644 --- a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceProviderImpl.java +++ b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceProviderImpl.java @@ -53,7 +53,14 @@ public class ServiceProviderImpl<T> implements ServiceProvider<T> ArrayList<InstanceFilter<T>> localFilters = Lists.newArrayList(filters); localFilters.add(downInstanceManager); - localFilters.add(new EnabledInstanceFilter<T>()); + localFilters.add(new InstanceFilter<T>() + { + @Override + public boolean apply(ServiceInstance<T> instance) + { + return instance.isEnabled(); + } + }); instanceProvider = new FilteredInstanceProvider<T>(cache, localFilters); }