helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject git commit: Get typed rebalancer and provisioner configs
Date Wed, 15 Jan 2014 21:53:36 GMT
Updated Branches:
  refs/heads/helix-provisioning 37dd3cf4b -> 852be0ccb


Get typed rebalancer and provisioner configs


Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/852be0cc
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/852be0cc
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/852be0cc

Branch: refs/heads/helix-provisioning
Commit: 852be0ccbfac64ff3d92367cdf04c2cebfbd6344
Parents: 37dd3cf
Author: Kanak Biscuitwala <kanak@apache.org>
Authored: Wed Jan 15 13:53:33 2014 -0800
Committer: Kanak Biscuitwala <kanak@apache.org>
Committed: Wed Jan 15 13:53:33 2014 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/helix/model/ResourceConfiguration.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/852be0cc/helix-core/src/main/java/org/apache/helix/model/ResourceConfiguration.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/model/ResourceConfiguration.java b/helix-core/src/main/java/org/apache/helix/model/ResourceConfiguration.java
index 3ead10a..65762cf 100644
--- a/helix-core/src/main/java/org/apache/helix/model/ResourceConfiguration.java
+++ b/helix-core/src/main/java/org/apache/helix/model/ResourceConfiguration.java
@@ -109,7 +109,7 @@ public class ResourceConfiguration extends HelixProperty {
    * Get a RebalancerConfig if available
    * @return RebalancerConfig, or null
    */
-  public RebalancerConfig getRebalancerConfig(Class<? extends RebalancerConfig> clazz)
{
+  public <T extends RebalancerConfig> T getRebalancerConfig(Class<T> clazz) {
     RebalancerConfigHolder config = new RebalancerConfigHolder(this);
     return config.getRebalancerConfig(clazz);
   }
@@ -119,7 +119,7 @@ public class ResourceConfiguration extends HelixProperty {
    * @param clazz the class to cast to
    * @return ProvisionerConfig, or null
    */
-  public ProvisionerConfig getProvisionerConfig(Class<? extends ProvisionerConfig>
clazz) {
+  public <T extends ProvisionerConfig> T getProvisionerConfig(Class<T> clazz)
{
     ProvisionerConfigHolder configHolder = new ProvisionerConfigHolder(this);
     return configHolder.getProvisionerConfig(clazz);
   }


Mime
View raw message