helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zzh...@apache.org
Subject [46/51] [partial] [HELIX-198] Unify helix code style, rb=13710
Date Wed, 21 Aug 2013 20:43:59 GMT
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/HelixManager.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/HelixManager.java b/helix-core/src/main/java/org/apache/helix/HelixManager.java
index a4e2c55..808705b 100644
--- a/helix-core/src/main/java/org/apache/helix/HelixManager.java
+++ b/helix-core/src/main/java/org/apache/helix/HelixManager.java
@@ -29,12 +29,10 @@ import org.apache.helix.participant.StateMachineEngine;
 import org.apache.helix.spectator.RoutingTableProvider;
 import org.apache.helix.store.zk.ZkHelixPropertyStore;
 
-
 /**
  * Class that represents the Helix Agent.
  * First class Object any process will interact with<br/>
  * General flow <blockquote>
- * 
  * <pre>
  * manager = HelixManagerFactory.getZKHelixManager(
  *    clusterName, instanceName, ROLE, zkAddr);
@@ -49,15 +47,12 @@ import org.apache.helix.store.zk.ZkHelixPropertyStore;
  * FINALIZE -> will be invoked when listener is removed or session expires
  * manager.disconnect()
  * </pre>
- * 
  * </blockquote> Default implementations available
- * 
  * @see HelixStateMachineEngine HelixStateMachineEngine for participant
  * @see RoutingTableProvider RoutingTableProvider for spectator
  * @see GenericHelixController RoutingTableProvider for controller
  */
-public interface HelixManager
-{
+public interface HelixManager {
 
   public static final String ALLOW_PARTICIPANT_AUTO_JOIN = "ALLOW_PARTICIPANT_AUTO_JOIN";
 
@@ -65,7 +60,6 @@ public interface HelixManager
    * Start participating in the cluster operations. All listeners will be
    * initialized and will be notified for every cluster state change This method
    * is not re-entrant. One cannot call this method twice.
-   * 
    * @throws Exception
    */
   void connect() throws Exception;
@@ -75,7 +69,6 @@ public interface HelixManager
    * always do this if( manager.isConnected()){ //custom code } This will
    * prevent client in doing anything when its disconnected from the cluster.
    * There is no need to invoke connect again if isConnected return false.
-   * 
    * @return true if connected, false otherwise
    */
   boolean isConnected();
@@ -92,21 +85,17 @@ public interface HelixManager
    * @param listener
    * @throws Exception
    */
-  void addIdealStateChangeListener(IdealStateChangeListener listener)
-      throws Exception;
+  void addIdealStateChangeListener(IdealStateChangeListener listener) throws Exception;
 
   /**
-   * @see LiveInstanceChangeListener#onLiveInstanceChange(List,
-   *      NotificationContext)
+   * @see LiveInstanceChangeListener#onLiveInstanceChange(List, NotificationContext)
    * @param listener
    */
-  void addLiveInstanceChangeListener(LiveInstanceChangeListener listener)
-      throws Exception;
+  void addLiveInstanceChangeListener(LiveInstanceChangeListener listener) throws Exception;
 
   /**
    * @see ConfigChangeListener#onConfigChange(List, NotificationContext)
    * @param listener
-   * 
    * @deprecated replaced by addInstanceConfigChangeListener()
    */
   void addConfigChangeListener(ConfigChangeListener listener) throws Exception;
@@ -114,7 +103,6 @@ public interface HelixManager
   /**
    * @see InstanceConfigChangeListener#onInstanceConfigChange(List, NotificationContext)
    * @param listener
-   * 
    */
   void addInstanceConfigChangeListener(InstanceConfigChangeListener listener) throws Exception;
 
@@ -123,46 +111,41 @@ public interface HelixManager
    * @param listener
    * @param scope
    */
-  void addConfigChangeListener(ScopedConfigChangeListener listener, ConfigScopeProperty scope) throws Exception;
-  
+  void addConfigChangeListener(ScopedConfigChangeListener listener, ConfigScopeProperty scope)
+      throws Exception;
+
   /**
    * @see MessageListener#onMessage(String, List, NotificationContext)
    * @param listener
    * @param instanceName
    */
-  void addMessageListener(MessageListener listener, String instanceName)
-      throws Exception;
+  void addMessageListener(MessageListener listener, String instanceName) throws Exception;
 
   /**
-   * @see CurrentStateChangeListener#onStateChange(String, List,
-   *      NotificationContext)
+   * @see CurrentStateChangeListener#onStateChange(String, List, NotificationContext)
    * @param listener
    * @param instanceName
    */
 
-  void addCurrentStateChangeListener(CurrentStateChangeListener listener,
-      String instanceName, String sessionId) throws Exception;
+  void addCurrentStateChangeListener(CurrentStateChangeListener listener, String instanceName,
+      String sessionId) throws Exception;
 
   /**
-   * @see HealthStateChangeListener#onHealthChange(String, List,
-   *      NotificationContext)
+   * @see HealthStateChangeListener#onHealthChange(String, List, NotificationContext)
    * @param listener
    * @param instanceName
    */
-  void addHealthStateChangeListener(HealthStateChangeListener listener,
-      String instanceName) throws Exception;
+  void addHealthStateChangeListener(HealthStateChangeListener listener, String instanceName)
+      throws Exception;
 
   /**
-   * @see ExternalViewChangeListener#onExternalViewChange(List,
-   *      NotificationContext)
+   * @see ExternalViewChangeListener#onExternalViewChange(List, NotificationContext)
    * @param listener
    */
-  void addExternalViewChangeListener(ExternalViewChangeListener listener)
-      throws Exception;
+  void addExternalViewChangeListener(ExternalViewChangeListener listener) throws Exception;
 
   /**
    * Add listener for controller change
-   * 
    * Used in distributed cluster controller
    */
   void addControllerListener(ControllerChangeListener listener);
@@ -177,36 +160,32 @@ public interface HelixManager
    * automatically. <br/>
    * This provides the ability for listeners to either reset their state or do
    * any cleanup tasks.<br/>
-   * 
    * @param listener
    * @return true if removed successfully, false otherwise
    */
   boolean removeListener(PropertyKey key, Object listener);
+
   /**
    * Return the client to perform read/write operations on the cluster data
    * store
-   * 
    * @return ClusterDataAccessor
    */
   HelixDataAccessor getHelixDataAccessor();
 
   /**
    * Get config accessor
-   * 
    * @return ConfigAccessor
    */
   ConfigAccessor getConfigAccessor();
 
   /**
    * Returns the cluster name associated with this cluster manager
-   * 
    * @return the associated cluster name
    */
   String getClusterName();
 
   /**
    * Returns the instanceName used to connect to the cluster
-   * 
    * @return the associated instance name
    */
 
@@ -214,7 +193,6 @@ public interface HelixManager
 
   /**
    * Get the sessionId associated with the connection to cluster data store.
-   *
    * @return the session identifier
    */
   String getSessionId();
@@ -224,28 +202,24 @@ public interface HelixManager
    * be used to check if there was any new notification when previous
    * notification was being processed. This is updated based on the
    * notifications from listeners registered.
-   *
    * @return UNIX timestamp
    */
   long getLastNotificationTime();
 
   /**
    * Provides admin interface to setup and modify cluster.
-   * 
    * @return instantiated HelixAdmin
    */
   HelixAdmin getClusterManagmentTool();
 
   /**
    * Get property store
-   * 
    * @return the property store that works with ZNRecord objects
    */
   ZkHelixPropertyStore<ZNRecord> getHelixPropertyStore();
 
   /**
    * Messaging service which can be used to send cluster wide messages.
-   *
    * @return messaging service
    */
   ClusterMessagingService getMessagingService();
@@ -253,72 +227,66 @@ public interface HelixManager
   /**
    * Participant only component that periodically update participant health
    * report to cluster manager server.
-   *
    * @return ParticipantHealthReportCollector
    */
   ParticipantHealthReportCollector getHealthReportCollector();
 
   /**
    * Get cluster manager instance type
-   * 
    * @return instance type (e.g. PARTICIPANT, CONTROLLER, SPECTATOR)
    */
   InstanceType getInstanceType();
 
   /**
    * Get cluster manager version
-   * 
    * @return the cluster manager version
    */
   String getVersion();
 
   /**
-   * Get helix manager properties read from 
-   * helix-core/src/main/resources/cluster-manager.properties 
-   * 
+   * Get helix manager properties read from
+   * helix-core/src/main/resources/cluster-manager.properties
    * @return deserialized properties
    */
   HelixManagerProperties getProperties();
-  
+
   /**
-   * 
    * @return the state machine engine
    */
   StateMachineEngine getStateMachineEngine();
 
   /**
    * Check if the cluster manager is the leader
-   * 
    * @return true if this is a controller and a leader of the cluster
    */
   boolean isLeader();
 
   /**
    * start timer tasks when becomes leader
-   * 
    */
   void startTimerTasks();
 
   /**
    * stop timer tasks when becomes standby
-   * 
    */
   void stopTimerTasks();
-  
+
   /**
    * Add a callback that is invoked before a participant joins the cluster.</br>
-   * This zookeeper connection is established at this time and one can read existing cluster data</br>
-   * The purpose of this method is to allow application to have additional logic to validate their existing state and check for any errors.
+   * This zookeeper connection is established at this time and one can read existing cluster
+   * data</br>
+   * The purpose of this method is to allow application to have additional logic to validate their
+   * existing state and check for any errors.
    * If the validation fails, throw exception/disable the instance. s
    * @see PreConnectCallback#onPreConnect()
    * @param callback
    */
   void addPreConnectCallback(PreConnectCallback callback);
-  
+
   /**
    * Add a LiveInstanceInfoProvider that is invoked before creating liveInstance.</br>
-   * This allows applications to provide additional metadata that will be published to zk and made available for discovery</br>
-   * 
+   * This allows applications to provide additional metadata that will be published to zk and made
+   * available for discovery</br>
    * @see LiveInstanceInfoProvider#getAdditionalLiveInstanceInfo()
    * @param liveInstanceInfoProvider
    */

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/HelixManagerFactory.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/HelixManagerFactory.java b/helix-core/src/main/java/org/apache/helix/HelixManagerFactory.java
index 1f39d46..1847546 100644
--- a/helix-core/src/main/java/org/apache/helix/HelixManagerFactory.java
+++ b/helix-core/src/main/java/org/apache/helix/HelixManagerFactory.java
@@ -31,25 +31,20 @@ import org.apache.log4j.Logger;
 /**
  * Obtain one of a set of Helix cluster managers, organized by the backing system.
  */
-public final class HelixManagerFactory
-{
+public final class HelixManagerFactory {
   private static final Logger logger = Logger.getLogger(HelixManagerFactory.class);
 
   /**
    * Construct a zk-based cluster manager that enforces all types (PARTICIPANT, CONTROLLER, and
    * SPECTATOR) to have a name
-   * 
    * @param clusterName
    * @param instanceName
    * @param type
    * @param zkAddr
    * @return a HelixManager backed by Zookeeper
    */
-  public static HelixManager getZKHelixManager(String clusterName,
-                                               String instanceName,
-                                               InstanceType type,
-                                               String zkAddr)
-  {
+  public static HelixManager getZKHelixManager(String clusterName, String instanceName,
+      InstanceType type, String zkAddr) {
     return new ZKHelixManager(clusterName, instanceName, type, zkAddr);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/HelixManagerProperties.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/HelixManagerProperties.java b/helix-core/src/main/java/org/apache/helix/HelixManagerProperties.java
index 77f6697..2318d20 100644
--- a/helix-core/src/main/java/org/apache/helix/HelixManagerProperties.java
+++ b/helix-core/src/main/java/org/apache/helix/HelixManagerProperties.java
@@ -25,36 +25,29 @@ import java.util.Properties;
 import org.apache.log4j.Logger;
 
 /**
- * hold helix-manager properties read from 
- * helix-core/src/main/resources/cluster-manager.properties 
- *
+ * hold helix-manager properties read from
+ * helix-core/src/main/resources/cluster-manager.properties
  */
-public class HelixManagerProperties
-{
-  private static final Logger LOG = Logger
-      .getLogger(HelixManagerProperties.class.getName());
-  
+public class HelixManagerProperties {
+  private static final Logger LOG = Logger.getLogger(HelixManagerProperties.class.getName());
+
   private final Properties _properties = new Properties();
 
   /**
    * Initialize properties from a file
    * @param propertyFileName
    */
-  public HelixManagerProperties(String propertyFileName)
-  {
-    try
-    {
-      InputStream stream = Thread.currentThread().getContextClassLoader()
-          .getResourceAsStream(propertyFileName);
+  public HelixManagerProperties(String propertyFileName) {
+    try {
+      InputStream stream =
+          Thread.currentThread().getContextClassLoader().getResourceAsStream(propertyFileName);
       _properties.load(stream);
-      
-    }
-    catch (Exception e)
-    {
+
+    } catch (Exception e) {
       String errMsg = "fail to open properties file: " + propertyFileName;
       throw new IllegalArgumentException(errMsg, e);
     }
-    
+
     LOG.info("load helix-manager properties: " + _properties);
   }
 
@@ -70,7 +63,7 @@ public class HelixManagerProperties
   public Properties getProperties() {
     return _properties;
   }
-  
+
   /**
    * get helix version
    * @return version read from properties
@@ -78,15 +71,13 @@ public class HelixManagerProperties
   public String getVersion() {
     return this.getProperty("clustermanager.version");
   }
-  
+
   /**
    * get property for key
-   * 
    * @param key
    * @return property associated by key
    */
-  public String getProperty(String key)
-  {
+  public String getProperty(String key) {
     String value = _properties.getProperty(key);
     if (value == null) {
       LOG.warn("no property for key: " + key);
@@ -94,12 +85,11 @@ public class HelixManagerProperties
 
     return value;
   }
-    
+
   /**
    * return true if version1 >= version2, false otherwise, ignore non-numerical strings
    * assume version in format of n.n.n-x-x, where n is number and x is any string
    * e.g. 0.6.0-incubating-SNAPSHOT
-   * 
    * @param version1
    * @param version2
    * @return true if version1 >= version2, false otherwise
@@ -109,20 +99,20 @@ public class HelixManagerProperties
       LOG.warn("fail to compare versions. version1: " + version1 + ", version2: " + version2);
       return true;
     }
-    
+
     String[] version1Splits = version1.split("(\\.|-)");
     String[] version2Splits = version2.split("(\\.|-)");
-    
-    if (version1Splits == null || version1Splits.length == 0 
-        || version2Splits == null || version2Splits.length == 0) {
+
+    if (version1Splits == null || version1Splits.length == 0 || version2Splits == null
+        || version2Splits.length == 0) {
       LOG.warn("fail to compare versions. version1: " + version1 + ", version2: " + version2);
     }
-    
+
     for (int i = 0; i < version1Splits.length && i < version2Splits.length; i++) {
       try {
         int versionNum1 = Integer.parseInt(version1Splits[i]);
         int versionNum2 = Integer.parseInt(version2Splits[i]);
-        
+
         if (versionNum1 < versionNum2) {
           return false;
         }
@@ -131,33 +121,31 @@ public class HelixManagerProperties
         break;
       }
     }
-    
+
     return true;
   }
-  
+
   /**
    * return true if participantVersion is no less than minimum supported version for participant
    * false otherwise
-   * 
    * @param participantVersion
    * @return true if compatible, false otherwise
    */
   public boolean isParticipantCompatible(String participantVersion) {
     return isFeatureSupported("participant", participantVersion);
   }
-  
+
   /**
    * return true if participantVersion is no less than minimum supported version for the feature
    * false otherwise
-   * 
    * @param featureName
    * @param participantVersion
    * @return true if supported, false otherwise
    */
   public boolean isFeatureSupported(String featureName, String participantVersion) {
-    String  minSupportedVersion = getProperty("minimum_supported_version." + featureName);
-    
+    String minSupportedVersion = getProperty("minimum_supported_version." + featureName);
+
     return versionNoLessThan(participantVersion, minSupportedVersion);
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/HelixProperty.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/HelixProperty.java b/helix-core/src/main/java/org/apache/helix/HelixProperty.java
index e60c409..2e19231 100644
--- a/helix-core/src/main/java/org/apache/helix/HelixProperty.java
+++ b/helix-core/src/main/java/org/apache/helix/HelixProperty.java
@@ -30,10 +30,8 @@ import java.util.Map;
 /**
  * A wrapper class for ZNRecord. Used as a base class for IdealState, CurrentState, etc.
  */
-public class HelixProperty
-{
-  public enum HelixPropertyAttribute
-  {
+public class HelixProperty {
+  public enum HelixPropertyAttribute {
     BUCKET_SIZE,
     BATCH_MESSAGE_MODE
   }
@@ -44,8 +42,7 @@ public class HelixProperty
    * Initialize the property with an identifier
    * @param id
    */
-  public HelixProperty(String id)
-  {
+  public HelixProperty(String id) {
     _record = new ZNRecord(id);
   }
 
@@ -53,8 +50,7 @@ public class HelixProperty
    * Initialize the property with an existing ZNRecord
    * @param record
    */
-  public HelixProperty(ZNRecord record)
-  {
+  public HelixProperty(ZNRecord record) {
     _record = new ZNRecord(record);
   }
 
@@ -62,8 +58,7 @@ public class HelixProperty
    * Get the property identifier
    * @return the property id
    */
-  public final String getId()
-  {
+  public final String getId() {
     return _record.getId();
   }
 
@@ -71,8 +66,7 @@ public class HelixProperty
    * Get the backing ZNRecord
    * @return ZNRecord object associated with this property
    */
-  public final ZNRecord getRecord()
-  {
+  public final ZNRecord getRecord() {
     return _record;
   }
 
@@ -80,14 +74,12 @@ public class HelixProperty
    * Set the changes to the backing ZNRecord
    * @param deltaList list of ZNRecord updates to be made
    */
-  public final void setDeltaList(List<ZNRecordDelta> deltaList)
-  {
+  public final void setDeltaList(List<ZNRecordDelta> deltaList) {
     _record.setDeltaList(deltaList);
   }
 
   @Override
-  public String toString()
-  {
+  public String toString() {
     return _record.toString();
   }
 
@@ -95,19 +87,13 @@ public class HelixProperty
    * Get the size of buckets defined
    * @return the bucket size, or 0 if not defined
    */
-  public int getBucketSize()
-  {
-    String bucketSizeStr =
-        _record.getSimpleField(HelixPropertyAttribute.BUCKET_SIZE.toString());
+  public int getBucketSize() {
+    String bucketSizeStr = _record.getSimpleField(HelixPropertyAttribute.BUCKET_SIZE.toString());
     int bucketSize = 0;
-    if (bucketSizeStr != null)
-    {
-      try
-      {
+    if (bucketSizeStr != null) {
+      try {
         bucketSize = Integer.parseInt(bucketSizeStr);
-      }
-      catch (NumberFormatException e)
-      {
+      } catch (NumberFormatException e) {
         // OK
       }
     }
@@ -118,8 +104,7 @@ public class HelixProperty
    * Set the size of buckets defined
    * @param bucketSize the bucket size (will default to 0 if negative)
    */
-  public void setBucketSize(int bucketSize)
-  {
+  public void setBucketSize(int bucketSize) {
     if (bucketSize <= 0)
       bucketSize = 0;
 
@@ -128,26 +113,21 @@ public class HelixProperty
 
   /**
    * static method that converts ZNRecord to an instance that subclasses HelixProperty
-   * 
    * @param clazz subclass of HelixProperty
    * @param record the ZNRecord describing the property
    * @return typed instance corresponding to the record, or null if conversion fails
    */
-  public static <T extends HelixProperty> T convertToTypedInstance(Class<T> clazz,
-                                                                   ZNRecord record)
-  {
-    if (record == null)
-    {
+  public static <T extends HelixProperty> T convertToTypedInstance(Class<T> clazz, ZNRecord record) {
+    if (record == null) {
       return null;
     }
 
-    try
-    {
-      Constructor<T> constructor = clazz.getConstructor(new Class[] { ZNRecord.class });
+    try {
+      Constructor<T> constructor = clazz.getConstructor(new Class[] {
+        ZNRecord.class
+      });
       return constructor.newInstance(record);
-    }
-    catch (Exception e)
-    {
+    } catch (Exception e) {
       // TODO Auto-generated catch block
       e.printStackTrace();
     }
@@ -162,19 +142,15 @@ public class HelixProperty
    * @return list of typed instances for which the conversion succeeded, or null if records is null
    */
   public static <T extends HelixProperty> List<T> convertToTypedList(Class<T> clazz,
-                                                                     Collection<ZNRecord> records)
-  {
-    if (records == null)
-    {
+      Collection<ZNRecord> records) {
+    if (records == null) {
       return null;
     }
 
     List<T> decorators = new ArrayList<T>();
-    for (ZNRecord record : records)
-    {
+    for (ZNRecord record : records) {
       T decorator = HelixProperty.convertToTypedInstance(clazz, record);
-      if (decorator != null)
-      {
+      if (decorator != null) {
         decorators.add(decorator);
       }
     }
@@ -186,16 +162,13 @@ public class HelixProperty
    * @param records the ZNRecords to convert
    * @return id --> HelixProperty subclass map
    */
-  public static <T extends HelixProperty> Map<String, T> convertListToMap(List<T> records)
-  {
-    if (records == null)
-    {
+  public static <T extends HelixProperty> Map<String, T> convertListToMap(List<T> records) {
+    if (records == null) {
       return Collections.emptyMap();
     }
 
     Map<String, T> decorators = new HashMap<String, T>();
-    for (T record : records)
-    {
+    for (T record : records) {
       decorators.put(record.getId(), record);
     }
     return decorators;
@@ -206,16 +179,13 @@ public class HelixProperty
    * @param typedInstances objects subclassing HelixProperty
    * @return a list of ZNRecord objects
    */
-  public static <T extends HelixProperty> List<ZNRecord> convertToList(List<T> typedInstances)
-  {
-    if (typedInstances == null)
-    {
+  public static <T extends HelixProperty> List<ZNRecord> convertToList(List<T> typedInstances) {
+    if (typedInstances == null) {
       return Collections.emptyList();
     }
 
     List<ZNRecord> records = new ArrayList<ZNRecord>();
-    for (T typedInstance : typedInstances)
-    {
+    for (T typedInstance : typedInstances) {
       records.add(typedInstance.getRecord());
     }
 
@@ -226,31 +196,23 @@ public class HelixProperty
    * Change the state of batch messaging
    * @param enable true to enable, false to disable
    */
-  public void setBatchMessageMode(boolean enable)
-  {
-    _record.setSimpleField(HelixPropertyAttribute.BATCH_MESSAGE_MODE.toString(), ""
-        + enable);
+  public void setBatchMessageMode(boolean enable) {
+    _record.setSimpleField(HelixPropertyAttribute.BATCH_MESSAGE_MODE.toString(), "" + enable);
   }
 
   /**
    * Get the state of batch messaging
    * @return true if enabled, false if disabled
    */
-  public boolean getBatchMessageMode()
-  {
-    String enableStr =
-        _record.getSimpleField(HelixPropertyAttribute.BATCH_MESSAGE_MODE.toString());
-    if (enableStr == null)
-    {
+  public boolean getBatchMessageMode() {
+    String enableStr = _record.getSimpleField(HelixPropertyAttribute.BATCH_MESSAGE_MODE.toString());
+    if (enableStr == null) {
       return false;
     }
 
-    try
-    {
+    try {
       return Boolean.parseBoolean(enableStr.toLowerCase());
-    }
-    catch (Exception e)
-    {
+    } catch (Exception e) {
       return false;
     }
   }
@@ -259,23 +221,18 @@ public class HelixProperty
    * Get property validity
    * @return true if valid, false if invalid
    */
-  public boolean isValid()
-  {
+  public boolean isValid() {
     return true;
   }
 
   @Override
-  public boolean equals(Object obj)
-  {
-    if (obj == null)
-    {
+  public boolean equals(Object obj) {
+    if (obj == null) {
       return false;
     }
-    if (obj instanceof HelixProperty)
-    {
+    if (obj instanceof HelixProperty) {
       HelixProperty that = (HelixProperty) obj;
-      if (that.getRecord() != null)
-      {
+      if (that.getRecord() != null) {
         return that.getRecord().equals(this.getRecord());
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/HelixTimerTask.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/HelixTimerTask.java b/helix-core/src/main/java/org/apache/helix/HelixTimerTask.java
index c975867..e53ac50 100644
--- a/helix-core/src/main/java/org/apache/helix/HelixTimerTask.java
+++ b/helix-core/src/main/java/org/apache/helix/HelixTimerTask.java
@@ -22,13 +22,12 @@ package org.apache.helix;
 /**
  * Interface for defining a generic task to run periodically.
  */
-public abstract class HelixTimerTask
-{
+public abstract class HelixTimerTask {
   /**
    * Start a timer task
    */
   public abstract void start();
-  
+
   /**
    * Stop a timer task
    */

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/IdealStateChangeListener.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/IdealStateChangeListener.java b/helix-core/src/main/java/org/apache/helix/IdealStateChangeListener.java
index 8104811..16f8947 100644
--- a/helix-core/src/main/java/org/apache/helix/IdealStateChangeListener.java
+++ b/helix-core/src/main/java/org/apache/helix/IdealStateChangeListener.java
@@ -26,12 +26,10 @@ import org.apache.helix.model.IdealState;
 /**
  * Interface to implement to listen for changes to the ideal state of resources.
  */
-public interface IdealStateChangeListener
-{
+public interface IdealStateChangeListener {
 
   /**
    * Invoed when ideal state changes
-   * 
    * @param idealState
    * @param changeContext
    */

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/InstanceConfigChangeListener.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/InstanceConfigChangeListener.java b/helix-core/src/main/java/org/apache/helix/InstanceConfigChangeListener.java
index 68446fc..c2e8f30 100644
--- a/helix-core/src/main/java/org/apache/helix/InstanceConfigChangeListener.java
+++ b/helix-core/src/main/java/org/apache/helix/InstanceConfigChangeListener.java
@@ -26,13 +26,12 @@ import org.apache.helix.model.InstanceConfig;
 /**
  * Interface to implement to listen for changes to instance configurations.
  */
-public interface InstanceConfigChangeListener 
-{
+public interface InstanceConfigChangeListener {
   /**
    * Invoked when participant config changes
-   * 
    * @param configs
    * @param changeContext
    */
-  public void onInstanceConfigChange(List<InstanceConfig> instanceConfigs, NotificationContext context);
-}
\ No newline at end of file
+  public void onInstanceConfigChange(List<InstanceConfig> instanceConfigs,
+      NotificationContext context);
+}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/InstanceType.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/InstanceType.java b/helix-core/src/main/java/org/apache/helix/InstanceType.java
index 3758aa3..e0dc32b 100644
--- a/helix-core/src/main/java/org/apache/helix/InstanceType.java
+++ b/helix-core/src/main/java/org/apache/helix/InstanceType.java
@@ -20,16 +20,14 @@ package org.apache.helix;
  */
 
 /**
- * CONTROLLER:     cluster managing component is a controller
- * PARTICIPANT:    participate in the cluster state changes
- * SPECTATOR:      interested in the state changes in the cluster
+ * CONTROLLER: cluster managing component is a controller
+ * PARTICIPANT: participate in the cluster state changes
+ * SPECTATOR: interested in the state changes in the cluster
  * CONTROLLER_PARTICIPANT:
- *  special participant that competes for the leader of CONTROLLER_CLUSTER
- *  used in cluster controller of distributed mode {@HelixControllerMain}
- *
+ * special participant that competes for the leader of CONTROLLER_CLUSTER
+ * used in cluster controller of distributed mode {@HelixControllerMain}
  */
-public enum InstanceType
-{
+public enum InstanceType {
   CONTROLLER,
   PARTICIPANT,
   SPECTATOR,

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/LiveInstanceChangeListener.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/LiveInstanceChangeListener.java b/helix-core/src/main/java/org/apache/helix/LiveInstanceChangeListener.java
index 1b85982..553cdd8 100644
--- a/helix-core/src/main/java/org/apache/helix/LiveInstanceChangeListener.java
+++ b/helix-core/src/main/java/org/apache/helix/LiveInstanceChangeListener.java
@@ -26,16 +26,14 @@ import org.apache.helix.model.LiveInstance;
 /**
  * Interface to implement to listen for live instance changes.
  */
-public interface LiveInstanceChangeListener
-{
+public interface LiveInstanceChangeListener {
 
   /**
    * Invoked when live instance changes
-   * 
    * @param liveInstances
    * @param changeContext
    */
   public void onLiveInstanceChange(List<LiveInstance> liveInstances,
-                                   NotificationContext changeContext);
+      NotificationContext changeContext);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/LiveInstanceInfoProvider.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/LiveInstanceInfoProvider.java b/helix-core/src/main/java/org/apache/helix/LiveInstanceInfoProvider.java
index 03f6061..91d6194 100644
--- a/helix-core/src/main/java/org/apache/helix/LiveInstanceInfoProvider.java
+++ b/helix-core/src/main/java/org/apache/helix/LiveInstanceInfoProvider.java
@@ -1,4 +1,5 @@
 package org.apache.helix;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -21,12 +22,10 @@ package org.apache.helix;
 /**
  * Interface to provide additional information about a live instance at creation time
  */
-public interface LiveInstanceInfoProvider
-{
+public interface LiveInstanceInfoProvider {
   /**
    * Callback function that is called by HelixManager before it creates LiveInstance Zk Node.
-   * The ZNRecord returned by this function 
-   * 
+   * The ZNRecord returned by this function
    * @see ZkHelixManager#addLiveInstance()
    * @see HelixManager#setLiveInstanceInfoProvider(LiveInstanceInfoProvider)
    */

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/MessageListener.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/MessageListener.java b/helix-core/src/main/java/org/apache/helix/MessageListener.java
index 8b15e5f..959dd28 100644
--- a/helix-core/src/main/java/org/apache/helix/MessageListener.java
+++ b/helix-core/src/main/java/org/apache/helix/MessageListener.java
@@ -26,12 +26,10 @@ import org.apache.helix.model.Message;
 /**
  * Interface to implement when there is a change to messages
  */
-public interface MessageListener
-{
+public interface MessageListener {
 
   /**
    * Invoked when message changes
-   * 
    * @param instanceName
    * @param messages
    * @param changeContext

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/NotificationContext.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/NotificationContext.java b/helix-core/src/main/java/org/apache/helix/NotificationContext.java
index 38f8c7b..a67cae9 100644
--- a/helix-core/src/main/java/org/apache/helix/NotificationContext.java
+++ b/helix-core/src/main/java/org/apache/helix/NotificationContext.java
@@ -25,17 +25,16 @@ import java.util.Map;
 /**
  * Metadata associated with a notification event and the current state of the cluster
  */
-public class NotificationContext
-{
-	/**
-	 * keys used for object map
-	 */
-	public enum MapKey {
-		TASK_EXECUTOR,
-		CURRENT_STATE_UPDATE,
-		HELIX_TASK_RESULT
-	}
-  
+public class NotificationContext {
+  /**
+   * keys used for object map
+   */
+  public enum MapKey {
+    TASK_EXECUTOR,
+    CURRENT_STATE_UPDATE,
+    HELIX_TASK_RESULT
+  }
+
   private Map<String, Object> _map;
 
   private HelixManager _manager;
@@ -47,8 +46,7 @@ public class NotificationContext
    * Get the name associated with the event
    * @return event name
    */
-  public String getEventName()
-  {
+  public String getEventName() {
     return _eventName;
   }
 
@@ -56,8 +54,7 @@ public class NotificationContext
    * Set the name associated with the event
    * @param eventName the event name
    */
-  public void setEventName(String eventName)
-  {
+  public void setEventName(String eventName) {
     _eventName = eventName;
   }
 
@@ -65,8 +62,7 @@ public class NotificationContext
    * Instantiate with a HelixManager
    * @param manager {@link HelixManager} object
    */
-  public NotificationContext(HelixManager manager)
-  {
+  public NotificationContext(HelixManager manager) {
     _manager = manager;
     _map = new HashMap<String, Object>();
   }
@@ -75,8 +71,7 @@ public class NotificationContext
    * Get the HelixManager associated with this notification
    * @return {@link HelixManager} object
    */
-  public HelixManager getManager()
-  {
+  public HelixManager getManager() {
     return _manager;
   }
 
@@ -84,8 +79,7 @@ public class NotificationContext
    * Get a map describing the update (keyed on {@link MapKey})
    * @return the object map describing the update
    */
-  public Map<String, Object> getMap()
-  {
+  public Map<String, Object> getMap() {
     return _map;
   }
 
@@ -93,8 +87,7 @@ public class NotificationContext
    * Get the type of the notification
    * @return the notification type
    */
-  public Type getType()
-  {
+  public Type getType() {
     return _type;
   }
 
@@ -102,8 +95,7 @@ public class NotificationContext
    * Set the HelixManager associated with this notification
    * @param manager {@link HelixManager} object
    */
-  public void setManager(HelixManager manager)
-  {
+  public void setManager(HelixManager manager) {
     this._manager = manager;
   }
 
@@ -112,8 +104,7 @@ public class NotificationContext
    * @param key String value of a {@link MapKey}
    * @param value
    */
-  public void add(String key, Object value)
-  {
+  public void add(String key, Object value) {
     _map.put(key, value);
   }
 
@@ -121,8 +112,7 @@ public class NotificationContext
    * Set the notification map
    * @param map
    */
-  public void setMap(Map<String, Object> map)
-  {
+  public void setMap(Map<String, Object> map) {
     this._map = map;
   }
 
@@ -130,8 +120,7 @@ public class NotificationContext
    * Set the notification type
    * @param {@link Type} object
    */
-  public void setType(Type type)
-  {
+  public void setType(Type type) {
     this._type = type;
   }
 
@@ -140,25 +129,24 @@ public class NotificationContext
    * @param key String from a {@link MapKey}
    * @return
    */
-  public Object get(String key)
-  {
+  public Object get(String key) {
     return _map.get(key);
   }
 
   /**
    * Valid types of notifications
    */
-  public enum Type
-  {
-    INIT, CALLBACK, FINALIZE
+  public enum Type {
+    INIT,
+    CALLBACK,
+    FINALIZE
   }
 
   /**
    * Get the path changed status
    * @return String corresponding to the path change
    */
-  public String getPathChanged()
-  {
+  public String getPathChanged() {
     return _pathChanged;
   }
 
@@ -166,8 +154,7 @@ public class NotificationContext
    * Set the path changed status
    * @param pathChanged
    */
-  public void setPathChanged(String pathChanged)
-  {
+  public void setPathChanged(String pathChanged) {
     this._pathChanged = pathChanged;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/PreConnectCallback.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/PreConnectCallback.java b/helix-core/src/main/java/org/apache/helix/PreConnectCallback.java
index 45da706..46ef586 100644
--- a/helix-core/src/main/java/org/apache/helix/PreConnectCallback.java
+++ b/helix-core/src/main/java/org/apache/helix/PreConnectCallback.java
@@ -22,12 +22,10 @@ package org.apache.helix;
 /**
  * Called to allow definition of tasks prior to connecting to Zookeeper
  */
-public interface PreConnectCallback
-{
+public interface PreConnectCallback {
   /**
    * Callback function that is called by HelixManager before connected to zookeeper. If
    * exception are thrown HelixManager will not connect and no live instance is created
-   * 
    * @see ZkHelixManager#handleNewSessionAsParticipant()
    */
   public void onPreConnect();

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/PropertyKey.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/PropertyKey.java b/helix-core/src/main/java/org/apache/helix/PropertyKey.java
index 36db697..0874958 100644
--- a/helix-core/src/main/java/org/apache/helix/PropertyKey.java
+++ b/helix-core/src/main/java/org/apache/helix/PropertyKey.java
@@ -66,14 +66,13 @@ import org.apache.log4j.Logger;
 /**
  * Key allowing for type-safe lookups of and conversions to {@link HelixProperty} objects.
  */
-public class PropertyKey
-{
-  private static Logger          LOG = Logger.getLogger(PropertyKey.class);
-  public PropertyType            _type;
-  private final String[]         _params;
+public class PropertyKey {
+  private static Logger LOG = Logger.getLogger(PropertyKey.class);
+  public PropertyType _type;
+  private final String[] _params;
   Class<? extends HelixProperty> _typeClazz;
 
-  //if type is CONFIGS, set configScope; otherwise null
+  // if type is CONFIGS, set configScope; otherwise null
   ConfigScopeProperty _configScope;
 
   /**
@@ -82,9 +81,7 @@ public class PropertyKey
    * @param typeClazz
    * @param params parameters associated with the key, the first of which is the cluster name
    */
-  public PropertyKey(PropertyType type, Class<? extends HelixProperty> typeClazz,
-		  String... params)
-  {
+  public PropertyKey(PropertyType type, Class<? extends HelixProperty> typeClazz, String... params) {
     this(type, null, typeClazz, params);
   }
 
@@ -95,14 +92,10 @@ public class PropertyKey
    * @param typeClazz
    * @param params parameters associated with the key, the first of which is the cluster name
    */
-  public PropertyKey(PropertyType type,
-		  			 ConfigScopeProperty configScope,
-                     Class<? extends HelixProperty> typeClazz,
-                     String... params)
-  {
+  public PropertyKey(PropertyType type, ConfigScopeProperty configScope,
+      Class<? extends HelixProperty> typeClazz, String... params) {
     _type = type;
-    if (params == null || params.length == 0 || Arrays.asList(params).contains(null))
-    {
+    if (params == null || params.length == 0 || Arrays.asList(params).contains(null)) {
       throw new IllegalArgumentException("params cannot be null");
     }
 
@@ -113,29 +106,25 @@ public class PropertyKey
   }
 
   @Override
-  public int hashCode()
-  {
+  public int hashCode() {
     return super.hashCode();
   }
 
   @Override
   public String toString() {
-	  return getPath();
+    return getPath();
   }
 
   /**
    * Get the path associated with this property
    * @return absolute path to the property
    */
-  public String getPath()
-  {
+  public String getPath() {
     String clusterName = _params[0];
     String[] subKeys = Arrays.copyOfRange(_params, 1, _params.length);
     String path = PropertyPathConfig.getPath(_type, clusterName, subKeys);
-    if (path == null)
-    {
-      LOG.error("Invalid property key with type:" + _type + "subKeys:"
-          + Arrays.toString(_params));
+    if (path == null) {
+      LOG.error("Invalid property key with type:" + _type + "subKeys:" + Arrays.toString(_params));
     }
     return path;
   }
@@ -143,16 +132,14 @@ public class PropertyKey
   /**
    * PropertyKey builder for a cluster
    */
-  public static class Builder
-  {
+  public static class Builder {
     private final String _clusterName;
 
     /**
      * Instantiate with a cluster name
      * @param clusterName
      */
-    public Builder(String clusterName)
-    {
+    public Builder(String clusterName) {
       _clusterName = clusterName;
     }
 
@@ -160,8 +147,7 @@ public class PropertyKey
      * Get a property key associated with {@link IdealState}
      * @return {@link PropertyKey}
      */
-    public PropertyKey idealStates()
-    {
+    public PropertyKey idealStates() {
       return new PropertyKey(IDEALSTATES, IdealState.class, _clusterName);
     }
 
@@ -170,8 +156,7 @@ public class PropertyKey
      * @param resourceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey idealStates(String resourceName)
-    {
+    public PropertyKey idealStates(String resourceName) {
       return new PropertyKey(IDEALSTATES, IdealState.class, _clusterName, resourceName);
     }
 
@@ -179,8 +164,7 @@ public class PropertyKey
      * Get a property key associated with {@link StateModelDefinition}
      * @return {@link PropertyKey}
      */
-    public PropertyKey stateModelDefs()
-    {
+    public PropertyKey stateModelDefs() {
       return new PropertyKey(STATEMODELDEFS, StateModelDefinition.class, _clusterName);
     }
 
@@ -189,53 +173,37 @@ public class PropertyKey
      * @param stateModelName
      * @return {@link PropertyKey}
      */
-    public PropertyKey stateModelDef(String stateModelName)
-    {
-      return new PropertyKey(STATEMODELDEFS,
-                             StateModelDefinition.class,
-                             _clusterName,
-                             stateModelName);
+    public PropertyKey stateModelDef(String stateModelName) {
+      return new PropertyKey(STATEMODELDEFS, StateModelDefinition.class, _clusterName,
+          stateModelName);
     }
 
     /**
      * Get a property key associated with all cluster configurations
      * @return {@link PropertyKey}
      */
-    
-    public PropertyKey clusterConfigs()
-    {
-      return new PropertyKey(CONFIGS,
-    		  				 ConfigScopeProperty.CLUSTER,
-                             HelixProperty.class,
-                             _clusterName,
-                             ConfigScopeProperty.CLUSTER.toString());
+
+    public PropertyKey clusterConfigs() {
+      return new PropertyKey(CONFIGS, ConfigScopeProperty.CLUSTER, HelixProperty.class,
+          _clusterName, ConfigScopeProperty.CLUSTER.toString());
     }
 
     /**
      * Get a property key associated with this cluster configuration
      * @return {@link PropertyKey}
      */
-    public PropertyKey clusterConfig()
-    {
-    	return new PropertyKey(CONFIGS,
- 				 ConfigScopeProperty.CLUSTER,
-                HelixProperty.class,
-                _clusterName,
-                ConfigScopeProperty.CLUSTER.toString(),
-                _clusterName);
+    public PropertyKey clusterConfig() {
+      return new PropertyKey(CONFIGS, ConfigScopeProperty.CLUSTER, HelixProperty.class,
+          _clusterName, ConfigScopeProperty.CLUSTER.toString(), _clusterName);
     }
 
     /**
      * Get a property key associated with {@link InstanceConfig}
      * @return {@link PropertyKey}
      */
-    public PropertyKey instanceConfigs()
-    {
-        return new PropertyKey(CONFIGS,
- 				 ConfigScopeProperty.PARTICIPANT,
-                InstanceConfig.class,
-                _clusterName,
-                ConfigScopeProperty.PARTICIPANT.toString());
+    public PropertyKey instanceConfigs() {
+      return new PropertyKey(CONFIGS, ConfigScopeProperty.PARTICIPANT, InstanceConfig.class,
+          _clusterName, ConfigScopeProperty.PARTICIPANT.toString());
     }
 
     /**
@@ -243,27 +211,18 @@ public class PropertyKey
      * @param instanceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey instanceConfig(String instanceName)
-    {
-      return new PropertyKey(CONFIGS,
-    		  	ConfigScopeProperty.PARTICIPANT,
-                             InstanceConfig.class,
-                             _clusterName,
-                             ConfigScopeProperty.PARTICIPANT.toString(),
-                             instanceName);
+    public PropertyKey instanceConfig(String instanceName) {
+      return new PropertyKey(CONFIGS, ConfigScopeProperty.PARTICIPANT, InstanceConfig.class,
+          _clusterName, ConfigScopeProperty.PARTICIPANT.toString(), instanceName);
     }
 
     /**
      * Get a property key associated with resource configurations
      * @return {@link PropertyKey}
      */
-    public PropertyKey resourceConfigs()
-    {
-      return new PropertyKey(CONFIGS,
-				 			 ConfigScopeProperty.RESOURCE,
-    		  				 HelixProperty.class,
-                             _clusterName,
-                             ConfigScopeProperty.RESOURCE.toString());
+    public PropertyKey resourceConfigs() {
+      return new PropertyKey(CONFIGS, ConfigScopeProperty.RESOURCE, HelixProperty.class,
+          _clusterName, ConfigScopeProperty.RESOURCE.toString());
     }
 
     /**
@@ -271,14 +230,9 @@ public class PropertyKey
      * @param resourceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey resourceConfig(String resourceName)
-    {
-      return new PropertyKey(CONFIGS,
-    		  				ConfigScopeProperty.RESOURCE,
-    		  				HelixProperty.class,
-                             _clusterName,
-                             ConfigScopeProperty.RESOURCE.toString(),
-                             resourceName);
+    public PropertyKey resourceConfig(String resourceName) {
+      return new PropertyKey(CONFIGS, ConfigScopeProperty.RESOURCE, HelixProperty.class,
+          _clusterName, ConfigScopeProperty.RESOURCE.toString(), resourceName);
     }
 
     /**
@@ -287,14 +241,9 @@ public class PropertyKey
      * @param partitionName
      * @return {@link PropertyKey}
      */
-    public PropertyKey partitionConfig(String resourceName, String partitionName)
-    {
-      return new PropertyKey(CONFIGS,
-    		  				ConfigScopeProperty.RESOURCE,
-    		  				HelixProperty.class,
-                             _clusterName,
-                             ConfigScopeProperty.RESOURCE.toString(),
-                             resourceName);
+    public PropertyKey partitionConfig(String resourceName, String partitionName) {
+      return new PropertyKey(CONFIGS, ConfigScopeProperty.RESOURCE, HelixProperty.class,
+          _clusterName, ConfigScopeProperty.RESOURCE.toString(), resourceName);
     }
 
     /**
@@ -304,50 +253,37 @@ public class PropertyKey
      * @param partitionName
      * @return {@link PropertyKey}
      */
-    public PropertyKey partitionConfig(String instanceName,
-                                       String resourceName,
-                                       String partitionName)
-    {
-      return new PropertyKey(CONFIGS,
-    		  				ConfigScopeProperty.RESOURCE,
-				 			 HelixProperty.class,
-				 			 _clusterName,
-                             ConfigScopeProperty.RESOURCE.toString(),
-                             resourceName);
+    public PropertyKey partitionConfig(String instanceName, String resourceName,
+        String partitionName) {
+      return new PropertyKey(CONFIGS, ConfigScopeProperty.RESOURCE, HelixProperty.class,
+          _clusterName, ConfigScopeProperty.RESOURCE.toString(), resourceName);
     }
 
     /**
      * Get a property key associated with {@link ClusterConstraints}
      * @return {@link PropertyKey}
      */
-    public PropertyKey constraints()
-    {
-      return new PropertyKey(CONFIGS,
-                             ClusterConstraints.class,
-                             _clusterName,
-                             ConfigScopeProperty.CONSTRAINT.toString());
+    public PropertyKey constraints() {
+      return new PropertyKey(CONFIGS, ClusterConstraints.class, _clusterName,
+          ConfigScopeProperty.CONSTRAINT.toString());
     }
+
     /**
      * Get a property key associated with a specific {@link ClusterConstraints}
      * @param constraintType
      * @return {@link PropertyKey}
      */
-    
-    public PropertyKey constraint(String constraintType)
-    {
-      return new PropertyKey(CONFIGS,
-                             ClusterConstraints.class,
-                             _clusterName,
-                             ConfigScopeProperty.CONSTRAINT.toString(),
-                             constraintType);
+
+    public PropertyKey constraint(String constraintType) {
+      return new PropertyKey(CONFIGS, ClusterConstraints.class, _clusterName,
+          ConfigScopeProperty.CONSTRAINT.toString(), constraintType);
     }
 
     /**
      * Get a property key associated with {@link LiveInstance}
      * @return {@link PropertyKey}
      */
-    public PropertyKey liveInstances()
-    {
+    public PropertyKey liveInstances() {
       return new PropertyKey(LIVEINSTANCES, LiveInstance.class, _clusterName);
     }
 
@@ -356,20 +292,15 @@ public class PropertyKey
      * @param instanceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey liveInstance(String instanceName)
-    {
-      return new PropertyKey(LIVEINSTANCES,
-                             LiveInstance.class,
-                             _clusterName,
-                             instanceName);
+    public PropertyKey liveInstance(String instanceName) {
+      return new PropertyKey(LIVEINSTANCES, LiveInstance.class, _clusterName, instanceName);
     }
 
     /**
      * Get a property key associated with all instances
      * @return {@link PropertyKey}
      */
-    public PropertyKey instances()
-    {
+    public PropertyKey instances() {
       return new PropertyKey(PropertyType.INSTANCES, null, _clusterName);
     }
 
@@ -378,8 +309,7 @@ public class PropertyKey
      * @param instanceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey messages(String instanceName)
-    {
+    public PropertyKey messages(String instanceName) {
       return new PropertyKey(MESSAGES, Message.class, _clusterName, instanceName);
     }
 
@@ -389,13 +319,8 @@ public class PropertyKey
      * @param messageId
      * @return {@link PropertyKey}
      */
-    public PropertyKey message(String instanceName, String messageId)
-    {
-      return new PropertyKey(MESSAGES,
-                             Message.class,
-                             _clusterName,
-                             instanceName,
-                             messageId);
+    public PropertyKey message(String instanceName, String messageId) {
+      return new PropertyKey(MESSAGES, Message.class, _clusterName, instanceName, messageId);
     }
 
     /**
@@ -403,12 +328,8 @@ public class PropertyKey
      * @param instanceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey sessions(String instanceName)
-    {
-      return new PropertyKey(CURRENTSTATES,
-                             CurrentState.class,
-                             _clusterName,
-                             instanceName);
+    public PropertyKey sessions(String instanceName) {
+      return new PropertyKey(CURRENTSTATES, CurrentState.class, _clusterName, instanceName);
     }
 
     /**
@@ -417,13 +338,9 @@ public class PropertyKey
      * @param sessionId
      * @return {@link PropertyKey}
      */
-    public PropertyKey currentStates(String instanceName, String sessionId)
-    {
-      return new PropertyKey(CURRENTSTATES,
-                             CurrentState.class,
-                             _clusterName,
-                             instanceName,
-                             sessionId);
+    public PropertyKey currentStates(String instanceName, String sessionId) {
+      return new PropertyKey(CURRENTSTATES, CurrentState.class, _clusterName, instanceName,
+          sessionId);
     }
 
     /**
@@ -434,16 +351,9 @@ public class PropertyKey
      * @param resourceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey currentState(String instanceName,
-                                    String sessionId,
-                                    String resourceName)
-    {
-      return new PropertyKey(CURRENTSTATES,
-                             CurrentState.class,
-                             _clusterName,
-                             instanceName,
-                             sessionId,
-                             resourceName);
+    public PropertyKey currentState(String instanceName, String sessionId, String resourceName) {
+      return new PropertyKey(CURRENTSTATES, CurrentState.class, _clusterName, instanceName,
+          sessionId, resourceName);
     }
 
     /**
@@ -455,30 +365,15 @@ public class PropertyKey
      * @param bucketName
      * @return {@link PropertyKey}
      */
-    public PropertyKey currentState(String instanceName,
-                                    String sessionId,
-                                    String resourceName,
-                                    String bucketName)
-    {
-      if (bucketName == null)
-      {
-        return new PropertyKey(CURRENTSTATES,
-                               CurrentState.class,
-                               _clusterName,
-                               instanceName,
-                               sessionId,
-                               resourceName);
+    public PropertyKey currentState(String instanceName, String sessionId, String resourceName,
+        String bucketName) {
+      if (bucketName == null) {
+        return new PropertyKey(CURRENTSTATES, CurrentState.class, _clusterName, instanceName,
+            sessionId, resourceName);
 
-      }
-      else
-      {
-        return new PropertyKey(CURRENTSTATES,
-                               CurrentState.class,
-                               _clusterName,
-                               instanceName,
-                               sessionId,
-                               resourceName,
-                               bucketName);
+      } else {
+        return new PropertyKey(CURRENTSTATES, CurrentState.class, _clusterName, instanceName,
+            sessionId, resourceName, bucketName);
       }
     }
 
@@ -491,18 +386,10 @@ public class PropertyKey
      * @param partitionName
      * @return {@link PropertyKey}
      */
-    public PropertyKey stateTransitionStatus(String instanceName,
-                                             String sessionId,
-                                             String resourceName,
-                                             String partitionName)
-    {
-      return new PropertyKey(STATUSUPDATES,
-                             StatusUpdate.class,
-                             _clusterName,
-                             instanceName,
-                             sessionId,
-                             resourceName,
-                             partitionName);
+    public PropertyKey stateTransitionStatus(String instanceName, String sessionId,
+        String resourceName, String partitionName) {
+      return new PropertyKey(STATUSUPDATES, StatusUpdate.class, _clusterName, instanceName,
+          sessionId, resourceName, partitionName);
     }
 
     /**
@@ -513,16 +400,10 @@ public class PropertyKey
      * @param resourceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey stateTransitionStatus(String instanceName,
-                                             String sessionId,
-                                             String resourceName)
-    {
-      return new PropertyKey(STATUSUPDATES,
-                             StatusUpdate.class,
-                             _clusterName,
-                             instanceName,
-                             sessionId,
-                             resourceName);
+    public PropertyKey stateTransitionStatus(String instanceName, String sessionId,
+        String resourceName) {
+      return new PropertyKey(STATUSUPDATES, StatusUpdate.class, _clusterName, instanceName,
+          sessionId, resourceName);
     }
 
     /**
@@ -531,36 +412,23 @@ public class PropertyKey
      * @param sessionId
      * @return {@link PropertyKey}
      */
-    public PropertyKey stateTransitionStatus(String instanceName, String sessionId)
-    {
-      return new PropertyKey(STATUSUPDATES,
-                             StatusUpdate.class,
-                             _clusterName,
-                             instanceName,
-                             sessionId);
+    public PropertyKey stateTransitionStatus(String instanceName, String sessionId) {
+      return new PropertyKey(STATUSUPDATES, StatusUpdate.class, _clusterName, instanceName,
+          sessionId);
     }
 
     /**
      * Used to get status update for a NON STATE TRANSITION type
-     *
      * @param instanceName
      * @param sessionId
      * @param msgType
      * @param msgId
      * @return {@link PropertyKey}
      */
-    public PropertyKey taskStatus(String instanceName,
-                                  String sessionId,
-                                  String msgType,
-                                  String msgId)
-    {
-      return new PropertyKey(STATUSUPDATES,
-                             StatusUpdate.class,
-                             _clusterName,
-                             instanceName,
-                             sessionId,
-                             msgType,
-                             msgId);
+    public PropertyKey taskStatus(String instanceName, String sessionId, String msgType,
+        String msgId) {
+      return new PropertyKey(STATUSUPDATES, StatusUpdate.class, _clusterName, instanceName,
+          sessionId, msgType, msgId);
     }
 
     /**
@@ -572,18 +440,10 @@ public class PropertyKey
      * @param partitionName
      * @return {@link PropertyKey}
      */
-    public PropertyKey stateTransitionError(String instanceName,
-                                            String sessionId,
-                                            String resourceName,
-                                            String partitionName)
-    {
-      return new PropertyKey(ERRORS,
-                             Error.class,
-                             _clusterName,
-                             instanceName,
-                             sessionId,
-                             resourceName,
-                             partitionName);
+    public PropertyKey stateTransitionError(String instanceName, String sessionId,
+        String resourceName, String partitionName) {
+      return new PropertyKey(ERRORS, Error.class, _clusterName, instanceName, sessionId,
+          resourceName, partitionName);
     }
 
     /**
@@ -594,47 +454,29 @@ public class PropertyKey
      * @param resourceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey stateTransitionErrors(String instanceName,
-                                             String sessionId,
-                                             String resourceName)
-    {
-      return new PropertyKey(ERRORS,
-                             Error.class,
-                             _clusterName,
-                             instanceName,
-                             sessionId,
-                             resourceName);
+    public PropertyKey stateTransitionErrors(String instanceName, String sessionId,
+        String resourceName) {
+      return new PropertyKey(ERRORS, Error.class, _clusterName, instanceName, sessionId,
+          resourceName);
     }
 
     /**
      * Used to get status update for a NON STATE TRANSITION type
-     *
      * @param instanceName
      * @param sessionId
      * @param msgType
      * @param msgId
      * @return {@link PropertyKey}
      */
-    public PropertyKey taskError(String instanceName,
-                                 String sessionId,
-                                 String msgType,
-                                 String msgId)
-    {
-      return new PropertyKey(ERRORS,
-                             null,
-                             _clusterName,
-                             instanceName,
-                             sessionId,
-                             msgType,
-                             msgId);
+    public PropertyKey taskError(String instanceName, String sessionId, String msgType, String msgId) {
+      return new PropertyKey(ERRORS, null, _clusterName, instanceName, sessionId, msgType, msgId);
     }
 
     /**
      * Get a property key associated with all {@link ExternalView}
      * @return {@link PropertyKey}
      */
-    public PropertyKey externalViews()
-    {
+    public PropertyKey externalViews() {
       return new PropertyKey(EXTERNALVIEW, ExternalView.class, _clusterName);
     }
 
@@ -643,8 +485,7 @@ public class PropertyKey
      * @param resourceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey externalView(String resourceName)
-    {
+    public PropertyKey externalView(String resourceName) {
       return new PropertyKey(EXTERNALVIEW, ExternalView.class, _clusterName, resourceName);
     }
 
@@ -652,8 +493,7 @@ public class PropertyKey
      * Get a property key associated with a controller
      * @return {@link PropertyKey}
      */
-    public PropertyKey controller()
-    {
+    public PropertyKey controller() {
       return new PropertyKey(CONTROLLER, null, _clusterName);
     }
 
@@ -661,8 +501,7 @@ public class PropertyKey
      * Get a property key associated with {@link StatusUpdate} of controller errors
      * @return {@link PropertyKey}
      */
-    public PropertyKey controllerTaskErrors()
-    {
+    public PropertyKey controllerTaskErrors() {
       return new PropertyKey(ERRORS_CONTROLLER, StatusUpdate.class, _clusterName);
     }
 
@@ -671,8 +510,7 @@ public class PropertyKey
      * @param errorId
      * @return {@link PropertyKey}
      */
-    public PropertyKey controllerTaskError(String errorId)
-    {
+    public PropertyKey controllerTaskError(String errorId) {
       return new PropertyKey(ERRORS_CONTROLLER, Error.class, _clusterName, errorId);
     }
 
@@ -681,12 +519,8 @@ public class PropertyKey
      * @param subPath
      * @return {@link PropertyKey}
      */
-    public PropertyKey controllerTaskStatuses(String subPath)
-    {
-      return new PropertyKey(STATUSUPDATES_CONTROLLER,
-                             StatusUpdate.class,
-                             _clusterName,
-                             subPath);
+    public PropertyKey controllerTaskStatuses(String subPath) {
+      return new PropertyKey(STATUSUPDATES_CONTROLLER, StatusUpdate.class, _clusterName, subPath);
     }
 
     /**
@@ -695,21 +529,16 @@ public class PropertyKey
      * @param recordName
      * @return {@link PropertyKey}
      */
-    public PropertyKey controllerTaskStatus(String subPath, String recordName)
-    {
-      return new PropertyKey(STATUSUPDATES_CONTROLLER,
-                             StatusUpdate.class,
-                             _clusterName,
-                             subPath,
-                             recordName);
+    public PropertyKey controllerTaskStatus(String subPath, String recordName) {
+      return new PropertyKey(STATUSUPDATES_CONTROLLER, StatusUpdate.class, _clusterName, subPath,
+          recordName);
     }
 
     /**
      * Get a property key associated with all {@link Message}s for the controller
      * @return {@link PropertyKey}
      */
-    public PropertyKey controllerMessages()
-    {
+    public PropertyKey controllerMessages() {
       return new PropertyKey(MESSAGES_CONTROLLER, Message.class, _clusterName);
     }
 
@@ -718,8 +547,7 @@ public class PropertyKey
      * @param msgId
      * @return {@link PropertyKey}
      */
-    public PropertyKey controllerMessage(String msgId)
-    {
+    public PropertyKey controllerMessage(String msgId) {
       return new PropertyKey(MESSAGES_CONTROLLER, Message.class, _clusterName, msgId);
     }
 
@@ -727,8 +555,7 @@ public class PropertyKey
      * Get a property key associated with {@link LeaderHistory}
      * @return {@link PropertyKey}
      */
-    public PropertyKey controllerLeaderHistory()
-    {
+    public PropertyKey controllerLeaderHistory() {
       return new PropertyKey(HISTORY, LeaderHistory.class, _clusterName);
     }
 
@@ -736,8 +563,7 @@ public class PropertyKey
      * Get a property key associated with a {@link LiveInstance} leader
      * @return {@link PropertyKey}
      */
-    public PropertyKey controllerLeader()
-    {
+    public PropertyKey controllerLeader() {
       return new PropertyKey(LEADER, LiveInstance.class, _clusterName);
     }
 
@@ -745,8 +571,7 @@ public class PropertyKey
      * Get a property key associated with {@link PauseSignal}
      * @return {@link PropertyKey}
      */
-    public PropertyKey pause()
-    {
+    public PropertyKey pause() {
       return new PropertyKey(PAUSE, PauseSignal.class, _clusterName);
     }
 
@@ -754,8 +579,7 @@ public class PropertyKey
      * Get a property key associated with {@link PersistentStats}
      * @return {@link PropertyKey}
      */
-    public PropertyKey persistantStat()
-    {
+    public PropertyKey persistantStat() {
       return new PropertyKey(PERSISTENTSTATS, PersistentStats.class, _clusterName);
     }
 
@@ -763,8 +587,7 @@ public class PropertyKey
      * Get a property key associated with {@link Alerts}
      * @return {@link PropertyKey}
      */
-    public PropertyKey alerts()
-    {
+    public PropertyKey alerts() {
       return new PropertyKey(ALERTS, Alerts.class, _clusterName);
     }
 
@@ -772,8 +595,7 @@ public class PropertyKey
      * Get a property key associated with {@link AlertStatus}
      * @return {@link PropertyKey}
      */
-    public PropertyKey alertStatus()
-    {
+    public PropertyKey alertStatus() {
       return new PropertyKey(ALERT_STATUS, AlertStatus.class, _clusterName);
     }
 
@@ -781,8 +603,7 @@ public class PropertyKey
      * Get a property key associated with {@link AlertHistory}
      * @return {@link PropertyKey}
      */
-    public PropertyKey alertHistory()
-    {
+    public PropertyKey alertHistory() {
       return new PropertyKey(ALERT_HISTORY, AlertHistory.class, _clusterName);
     }
 
@@ -792,13 +613,8 @@ public class PropertyKey
      * @param id identifies the statistics
      * @return {@link PropertyKey}
      */
-    public PropertyKey healthReport(String instanceName, String id)
-    {
-      return new PropertyKey(HEALTHREPORT,
-                             HealthStat.class,
-                             _clusterName,
-                             instanceName,
-                             id);
+    public PropertyKey healthReport(String instanceName, String id) {
+      return new PropertyKey(HEALTHREPORT, HealthStat.class, _clusterName, instanceName, id);
     }
 
     /**
@@ -806,8 +622,7 @@ public class PropertyKey
      * @param instanceName
      * @return {@link PropertyKey}
      */
-    public PropertyKey healthReports(String instanceName)
-    {
+    public PropertyKey healthReports(String instanceName) {
       return new PropertyKey(HEALTHREPORT, HealthStat.class, _clusterName, instanceName);
     }
 
@@ -817,8 +632,7 @@ public class PropertyKey
    * Get the associated property type
    * @return {@link PropertyType}
    */
-  public PropertyType getType()
-  {
+  public PropertyType getType() {
     return _type;
   }
 
@@ -826,8 +640,7 @@ public class PropertyKey
    * Get parameters associated with the key
    * @return the parameters in the same order they were provided
    */
-  public String[] getParams()
-  {
+  public String[] getParams() {
     return _params;
   }
 
@@ -835,8 +648,7 @@ public class PropertyKey
    * Get the associated class of this property
    * @return subclass of {@link HelixProperty}
    */
-  public Class<? extends HelixProperty> getTypeClass()
-  {
+  public Class<? extends HelixProperty> getTypeClass() {
     return _typeClazz;
   }
 
@@ -844,9 +656,8 @@ public class PropertyKey
    * Get the scope of this property
    * @return {@link ConfigScopeProperty}
    */
-  public ConfigScopeProperty getConfigScope()
-  {
-	  return _configScope;
+  public ConfigScopeProperty getConfigScope() {
+    return _configScope;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/PropertyPathConfig.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/PropertyPathConfig.java b/helix-core/src/main/java/org/apache/helix/PropertyPathConfig.java
index 07d0d3a..96e186d 100644
--- a/helix-core/src/main/java/org/apache/helix/PropertyPathConfig.java
+++ b/helix-core/src/main/java/org/apache/helix/PropertyPathConfig.java
@@ -57,13 +57,14 @@ import org.apache.log4j.Logger;
 /**
  * Utility mapping properties to their Zookeeper locations
  */
-public class PropertyPathConfig
-{
+public class PropertyPathConfig {
   private static Logger logger = Logger.getLogger(PropertyPathConfig.class);
 
-  static final Map<PropertyType, Map<Integer, String>> templateMap = new HashMap<PropertyType, Map<Integer, String>>();
-  static final Map<PropertyType, Class<? extends HelixProperty>> typeToClassMapping= new HashMap<PropertyType, Class<? extends HelixProperty>>();
-  static{
+  static final Map<PropertyType, Map<Integer, String>> templateMap =
+      new HashMap<PropertyType, Map<Integer, String>>();
+  static final Map<PropertyType, Class<? extends HelixProperty>> typeToClassMapping =
+      new HashMap<PropertyType, Class<? extends HelixProperty>>();
+  static {
     typeToClassMapping.put(LIVEINSTANCES, LiveInstance.class);
     typeToClassMapping.put(IDEALSTATES, IdealState.class);
     typeToClassMapping.put(CONFIGS, InstanceConfig.class);
@@ -144,10 +145,8 @@ public class PropertyPathConfig
   }
   static Pattern pattern = Pattern.compile("(\\{.+?\\})");
 
-  private static void addEntry(PropertyType type, int numKeys, String template)
-  {
-    if (!templateMap.containsKey(type))
-    {
+  private static void addEntry(PropertyType type, int numKeys, String template) {
+    if (!templateMap.containsKey(type)) {
       templateMap.put(type, new HashMap<Integer, String>());
     }
     logger.trace("Adding template for type:" + type.getType() + " arguments:" + numKeys
@@ -162,46 +161,37 @@ public class PropertyPathConfig
    * @param keys
    * @return a valid path, or null if none exists
    */
-  public static String getPath(PropertyType type, String clusterName, String... keys)
-  {
-    if (clusterName == null)
-    {
+  public static String getPath(PropertyType type, String clusterName, String... keys) {
+    if (clusterName == null) {
       logger.warn("ClusterName can't be null for type:" + type);
       return null;
     }
-    if (keys == null)
-    {
+    if (keys == null) {
       keys = new String[] {};
     }
     String template = null;
-    if (templateMap.containsKey(type))
-    {
+    if (templateMap.containsKey(type)) {
       // keys.length+1 since we add clusterName
       template = templateMap.get(type).get(keys.length + 1);
     }
 
     String result = null;
 
-    if (template != null)
-    {
+    if (template != null) {
       result = template;
       Matcher matcher = pattern.matcher(template);
       int count = 0;
-      while (matcher.find())
-      {
+      while (matcher.find()) {
         count = count + 1;
         String var = matcher.group();
-        if (count == 1)
-        {
+        if (count == 1) {
           result = result.replace(var, clusterName);
-        } else
-        {
+        } else {
           result = result.replace(var, keys[count - 2]);
         }
       }
     }
-    if (result == null || result.indexOf('{') > -1 || result.indexOf('}') > -1)
-    {
+    if (result == null || result.indexOf('{') > -1 || result.indexOf('}') > -1) {
       logger.warn("Unable to instantiate template:" + template + " using clusterName:"
           + clusterName + " and keys:" + Arrays.toString(keys));
     }
@@ -213,18 +203,15 @@ public class PropertyPathConfig
    * @param path
    * @return a valid instance name, or null if none exists
    */
-  public static String getInstanceNameFromPath(String path)
-  {
+  public static String getInstanceNameFromPath(String path) {
     // path structure
     // /<cluster_name>/instances/<instance_name>/[currentStates/messages]
-    if (path.contains("/" + PropertyType.INSTANCES + "/"))
-    {
+    if (path.contains("/" + PropertyType.INSTANCES + "/")) {
       String[] split = path.split("\\/");
-      if (split.length > 3)
-      {
+      if (split.length > 3) {
         return split[3];
       }
     }
     return null;
   }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/PropertyType.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/PropertyType.java b/helix-core/src/main/java/org/apache/helix/PropertyType.java
index d8eba45..f6145ed 100644
--- a/helix-core/src/main/java/org/apache/helix/PropertyType.java
+++ b/helix-core/src/main/java/org/apache/helix/PropertyType.java
@@ -22,16 +22,17 @@ package org.apache.helix;
 /**
  * Types of nodes in a Helix cluster
  */
-enum Type
-{
-  CLUSTER, INSTANCE, CONTROLLER, RESOURCE;
+enum Type {
+  CLUSTER,
+  INSTANCE,
+  CONTROLLER,
+  RESOURCE;
 }
 
 /**
  * Types of data stored on Zookeeper by Helix
  */
-public enum PropertyType
-{
+public enum PropertyType {
 
   // @formatter:off
   // CLUSTER PROPERTIES
@@ -65,8 +66,8 @@ public enum PropertyType
 
   // @formatter:on
 
-  Type    type;
-  
+  Type type;
+
   boolean isPersistent;
 
   boolean mergeOnUpdate;
@@ -83,52 +84,27 @@ public enum PropertyType
 
   boolean usePropertyTransferServer;
 
-  private PropertyType(Type type, boolean isPersistent, boolean mergeOnUpdate)
-  {
+  private PropertyType(Type type, boolean isPersistent, boolean mergeOnUpdate) {
     this(type, isPersistent, mergeOnUpdate, false);
   }
 
-  private PropertyType(Type type,
-                       boolean isPersistent,
-                       boolean mergeOnUpdate,
-                       boolean updateOnlyOnExists)
-  {
+  private PropertyType(Type type, boolean isPersistent, boolean mergeOnUpdate,
+      boolean updateOnlyOnExists) {
     this(type, isPersistent, mergeOnUpdate, false, false);
   }
 
-  private PropertyType(Type type,
-                       boolean isPersistent,
-                       boolean mergeOnUpdate,
-                       boolean updateOnlyOnExists,
-                       boolean createOnlyIfAbsent)
-  {
+  private PropertyType(Type type, boolean isPersistent, boolean mergeOnUpdate,
+      boolean updateOnlyOnExists, boolean createOnlyIfAbsent) {
     this(type, isPersistent, mergeOnUpdate, updateOnlyOnExists, createOnlyIfAbsent, false);
   }
 
-  private PropertyType(Type type,
-                       boolean isPersistent,
-                       boolean mergeOnUpdate,
-                       boolean updateOnlyOnExists,
-                       boolean createOnlyIfAbsent,
-                       boolean isCached)
-  {
-    this(type,
-         isPersistent,
-         mergeOnUpdate,
-         updateOnlyOnExists,
-         createOnlyIfAbsent,
-         isCached,
-         false);
-  }
-
-  private PropertyType(Type type,
-                       boolean isPersistent,
-                       boolean mergeOnUpdate,
-                       boolean updateOnlyOnExists,
-                       boolean createOnlyIfAbsent,
-                       boolean isCached,
-                       boolean isAsyncWrite)
-  {
+  private PropertyType(Type type, boolean isPersistent, boolean mergeOnUpdate,
+      boolean updateOnlyOnExists, boolean createOnlyIfAbsent, boolean isCached) {
+    this(type, isPersistent, mergeOnUpdate, updateOnlyOnExists, createOnlyIfAbsent, isCached, false);
+  }
+
+  private PropertyType(Type type, boolean isPersistent, boolean mergeOnUpdate,
+      boolean updateOnlyOnExists, boolean createOnlyIfAbsent, boolean isCached, boolean isAsyncWrite) {
     this.type = type;
     this.isPersistent = isPersistent;
     this.mergeOnUpdate = mergeOnUpdate;
@@ -142,8 +118,7 @@ public enum PropertyType
    * Determine if the property should only be created if it does not exist
    * @return true if it can only be created if absent, false otherwise
    */
-  public boolean isCreateOnlyIfAbsent()
-  {
+  public boolean isCreateOnlyIfAbsent() {
     return createOnlyIfAbsent;
   }
 
@@ -151,8 +126,7 @@ public enum PropertyType
    * Set policy for creating only if it does not already exist
    * @param createIfAbsent
    */
-  public void setCreateIfAbsent(boolean createIfAbsent)
-  {
+  public void setCreateIfAbsent(boolean createIfAbsent) {
     this.createOnlyIfAbsent = createIfAbsent;
   }
 
@@ -160,8 +134,7 @@ public enum PropertyType
    * Gets the type of the associated node
    * @return {@link Type}
    */
-  public Type getType()
-  {
+  public Type getType() {
     return type;
   }
 
@@ -169,8 +142,7 @@ public enum PropertyType
    * Set the type of the associated node
    * @param type {@link Type}
    */
-  public void setType(Type type)
-  {
+  public void setType(Type type) {
     this.type = type;
   }
 
@@ -178,8 +150,7 @@ public enum PropertyType
    * Get the persistent state of the property
    * @return true if persistent, false if ephemeral
    */
-  public boolean isPersistent()
-  {
+  public boolean isPersistent() {
     return isPersistent;
   }
 
@@ -187,8 +158,7 @@ public enum PropertyType
    * Set the persistent state of the property
    * @param isPersistent
    */
-  public void setPersistent(boolean isPersistent)
-  {
+  public void setPersistent(boolean isPersistent) {
     this.isPersistent = isPersistent;
   }
 
@@ -196,8 +166,7 @@ public enum PropertyType
    * Determine if the property is merged or replaced on update
    * @return true if merge occurs on update, false otherwise
    */
-  public boolean isMergeOnUpdate()
-  {
+  public boolean isMergeOnUpdate() {
     return mergeOnUpdate;
   }
 
@@ -205,8 +174,7 @@ public enum PropertyType
    * Enable or disable merging on an update to this property
    * @param mergeOnUpdate
    */
-  public void setMergeOnUpdate(boolean mergeOnUpdate)
-  {
+  public void setMergeOnUpdate(boolean mergeOnUpdate) {
     this.mergeOnUpdate = mergeOnUpdate;
   }
 
@@ -214,8 +182,7 @@ public enum PropertyType
    * Determine if this property is only updated if it exists
    * @return true if only updated when it exists, false otherwise
    */
-  public boolean isUpdateOnlyOnExists()
-  {
+  public boolean isUpdateOnlyOnExists() {
     return updateOnlyOnExists;
   }
 
@@ -223,8 +190,7 @@ public enum PropertyType
    * Enable or disable updating only on existence
    * @param updateOnlyOnExists
    */
-  public void setUpdateOnlyOnExists(boolean updateOnlyOnExists)
-  {
+  public void setUpdateOnlyOnExists(boolean updateOnlyOnExists) {
     this.updateOnlyOnExists = updateOnlyOnExists;
   }
 
@@ -232,8 +198,7 @@ public enum PropertyType
    * Check if value is cached
    * @return true if cached, false otherwise
    */
-  public boolean isCached()
-  {
+  public boolean isCached() {
     return isCached;
   }
 
@@ -241,8 +206,7 @@ public enum PropertyType
    * Check if this property uses a property transfer server
    * @return true if a property transfer server is used, false otherwise
    */
-  public boolean usePropertyTransferServer()
-  {
+  public boolean usePropertyTransferServer() {
     return usePropertyTransferServer;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/f414aad4/helix-core/src/main/java/org/apache/helix/ScopedConfigChangeListener.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/ScopedConfigChangeListener.java b/helix-core/src/main/java/org/apache/helix/ScopedConfigChangeListener.java
index 0444bf8..fd956d4 100644
--- a/helix-core/src/main/java/org/apache/helix/ScopedConfigChangeListener.java
+++ b/helix-core/src/main/java/org/apache/helix/ScopedConfigChangeListener.java
@@ -24,13 +24,11 @@ import java.util.List;
 /**
  * Interface to implement to listen for changes to any specified scope.
  */
-public interface ScopedConfigChangeListener 
-{
-    /**
-     * Invoked when configs of a scope (cluster, participant, or resource) change
-     * 
-     * @param configs
-     * @param context
-     */
-    public void onConfigChange(List<HelixProperty> configs, NotificationContext context);
-}
\ No newline at end of file
+public interface ScopedConfigChangeListener {
+  /**
+   * Invoked when configs of a scope (cluster, participant, or resource) change
+   * @param configs
+   * @param context
+   */
+  public void onConfigChange(List<HelixProperty> configs, NotificationContext context);
+}


Mime
View raw message