You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2017/04/24 16:59:56 UTC
[2/8] camel git commit: CAMEL-11192: Service Call - Some unused code
in camel-core
CAMEL-11192: Service Call - Some unused code in camel-core
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bb563eac
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bb563eac
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bb563eac
Branch: refs/heads/master
Commit: bb563eac0ad9ac6533b43e599a93f06befb083b6
Parents: dcf982f
Author: lburgazzoli <lb...@gmail.com>
Authored: Mon Apr 24 15:38:54 2017 +0200
Committer: lburgazzoli <lb...@gmail.com>
Committed: Mon Apr 24 15:38:54 2017 +0200
----------------------------------------------------------------------
.../org/apache/camel/impl/cloud/DefaultServiceDefinition.java | 5 +++--
.../java/org/apache/camel/impl/cloud/DefaultServiceHealth.java | 2 --
.../java/org/apache/camel/impl/cloud/HealthyServiceFilter.java | 2 --
.../org/apache/camel/impl/cloud/PassThroughServiceFilter.java | 2 --
4 files changed, 3 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/bb563eac/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceDefinition.java b/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceDefinition.java
index 74c306d..beed3cf 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceDefinition.java
@@ -24,6 +24,7 @@ import org.apache.camel.cloud.ServiceDefinition;
import org.apache.camel.cloud.ServiceHealth;
public class DefaultServiceDefinition implements ServiceDefinition {
+ private static final ServiceHealth DEFAULT_SERVICE_HEALTH = new DefaultServiceHealth();
private final String name;
private final String host;
@@ -36,7 +37,7 @@ public class DefaultServiceDefinition implements ServiceDefinition {
this.host = host;
this.port = port;
this.meta = Collections.emptyMap();
- this.health = DefaultServiceHealth.INSTANCE;
+ this.health = DEFAULT_SERVICE_HEALTH;
}
public DefaultServiceDefinition(String name, String host, int port, ServiceHealth health) {
@@ -52,7 +53,7 @@ public class DefaultServiceDefinition implements ServiceDefinition {
this.host = host;
this.port = port;
this.meta = meta != null ? Collections.unmodifiableMap(new HashMap<>(meta)) : Collections.emptyMap();
- this.health = DefaultServiceHealth.INSTANCE;
+ this.health = DEFAULT_SERVICE_HEALTH;
}
public DefaultServiceDefinition(String name, String host, int port, Map<String, String> meta, ServiceHealth health) {
http://git-wip-us.apache.org/repos/asf/camel/blob/bb563eac/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceHealth.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceHealth.java b/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceHealth.java
index 5bba70d..9a55b15 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceHealth.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/cloud/DefaultServiceHealth.java
@@ -23,8 +23,6 @@ import java.util.Map;
import org.apache.camel.cloud.ServiceHealth;
public class DefaultServiceHealth implements ServiceHealth {
- public static final ServiceHealth INSTANCE = new DefaultServiceHealth();
-
private final boolean healthy;
private final Map<String, String> meta;
http://git-wip-us.apache.org/repos/asf/camel/blob/bb563eac/camel-core/src/main/java/org/apache/camel/impl/cloud/HealthyServiceFilter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/cloud/HealthyServiceFilter.java b/camel-core/src/main/java/org/apache/camel/impl/cloud/HealthyServiceFilter.java
index c33d5aa..bc39362 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/cloud/HealthyServiceFilter.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/cloud/HealthyServiceFilter.java
@@ -23,8 +23,6 @@ import org.apache.camel.cloud.ServiceDefinition;
import org.apache.camel.cloud.ServiceFilter;
public class HealthyServiceFilter implements ServiceFilter {
- public static final ServiceFilter INSTANCE = new HealthyServiceFilter();
-
@Override
public List<ServiceDefinition> apply(List<ServiceDefinition> services) {
return services.stream().filter(s -> s.getHealth().isHealthy()).collect(Collectors.toList());
http://git-wip-us.apache.org/repos/asf/camel/blob/bb563eac/camel-core/src/main/java/org/apache/camel/impl/cloud/PassThroughServiceFilter.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/impl/cloud/PassThroughServiceFilter.java b/camel-core/src/main/java/org/apache/camel/impl/cloud/PassThroughServiceFilter.java
index 3152a57..752cb91 100644
--- a/camel-core/src/main/java/org/apache/camel/impl/cloud/PassThroughServiceFilter.java
+++ b/camel-core/src/main/java/org/apache/camel/impl/cloud/PassThroughServiceFilter.java
@@ -22,8 +22,6 @@ import org.apache.camel.cloud.ServiceDefinition;
import org.apache.camel.cloud.ServiceFilter;
public class PassThroughServiceFilter implements ServiceFilter {
- public static final ServiceFilter INSTANCE = new PassThroughServiceFilter();
-
@Override
public List<ServiceDefinition> apply(List<ServiceDefinition> services) {
return services;