geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [25/93] [partial] incubator-geode git commit: Added Spotless plugin to enforce formatting standards. Added Google Java Style guide formatter templates, removed existing formatter templates.
Date Wed, 26 Oct 2016 22:48:51 GMT
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/SystemMembershipListener.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/admin/SystemMembershipListener.java
b/geode-core/src/main/java/org/apache/geode/admin/SystemMembershipListener.java
index b1d6afe..eed5578 100644
--- a/geode-core/src/main/java/org/apache/geode/admin/SystemMembershipListener.java
+++ b/geode-core/src/main/java/org/apache/geode/admin/SystemMembershipListener.java
@@ -1,29 +1,29 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
  */
 package org.apache.geode.admin;
 
 /**
- * A listener whose callback methods are invoked when members join or
- * leave the GemFire distributed system.
+ * A listener whose callback methods are invoked when members join or leave the GemFire distributed
+ * system.
  *
  * @see AdminDistributedSystem#addMembershipListener
  *
  * @since GemFire 3.5
- * @deprecated as of 7.0 use the <code><a href="{@docRoot}/org/apache/geode/management/package-summary.html">management</a></code>
package instead
+ * @deprecated as of 7.0 use the <code><a href=
+ *             "{@docRoot}/org/apache/geode/management/package-summary.html">management</a></code>
+ *             package instead
  */
 public interface SystemMembershipListener {
 
@@ -33,29 +33,27 @@ public interface SystemMembershipListener {
   public void memberJoined(SystemMembershipEvent event);
 
   /**
-   * Invoked when a member has gracefully left the distributed system.  This
-   * occurs when the member took action to remove itself from the distributed
-   * system.
+   * Invoked when a member has gracefully left the distributed system. This occurs when the
member
+   * took action to remove itself from the distributed system.
    */
   public void memberLeft(SystemMembershipEvent event);
 
   /**
-   * Invoked when a member has unexpectedly left the distributed
-   * system.  This occurs when a member is forcibly removed from the
-   * distributed system by another process, such as from
-   * <a href=../distributed/DistributedSystem.html#member-timeout> failure detection</a>,
or
-   * <a href=../distributed/DistributedSystem.html#enable-network-partition-detection>
-   * network partition detection</a> processing.
+   * Invoked when a member has unexpectedly left the distributed system. This occurs when
a member
+   * is forcibly removed from the distributed system by another process, such as from <a
+   * href=../distributed/DistributedSystem.html#member-timeout> failure detection</a>,
or <a
+   * href=../distributed/DistributedSystem.html#enable-network-partition-detection> network
+   * partition detection</a> processing.
    */
   public void memberCrashed(SystemMembershipEvent event);
 
-//   /**
-//    * Invoked when a member broadcasts an informational message.
-//    *
-//    * @see org.apache.geode.distributed.DistributedSystem#fireInfoEvent
-//    *
-//    * @since GemFire 4.0
-//    */
-//   public void memberInfo(SystemMembershipEvent event);
+  // /**
+  // * Invoked when a member broadcasts an informational message.
+  // *
+  // * @see org.apache.geode.distributed.DistributedSystem#fireInfoEvent
+  // *
+  // * @since GemFire 4.0
+  // */
+  // public void memberInfo(SystemMembershipEvent event);
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/UnmodifiableConfigurationException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/admin/UnmodifiableConfigurationException.java
b/geode-core/src/main/java/org/apache/geode/admin/UnmodifiableConfigurationException.java
index e89fc96..758dbd7 100755
--- a/geode-core/src/main/java/org/apache/geode/admin/UnmodifiableConfigurationException.java
+++ b/geode-core/src/main/java/org/apache/geode/admin/UnmodifiableConfigurationException.java
@@ -1,88 +1,81 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
  */
-   
+
 package org.apache.geode.admin;
 
 /**
- * An <code>UnmodifiableConfigurationException</code> is thrown when an attempt
- * is made to modify the value of an unmodifiable 
- * {@link ConfigurationParameter}.
+ * An <code>UnmodifiableConfigurationException</code> is thrown when an attempt
is made to modify
+ * the value of an unmodifiable {@link ConfigurationParameter}.
  *
- * @since GemFire     3.5
+ * @since GemFire 3.5
  *
- * @deprecated as of 7.0 use the <code><a href="{@docRoot}/org/apache/geode/management/package-summary.html">management</a></code>
package instead
+ * @deprecated as of 7.0 use the <code><a href=
+ *             "{@docRoot}/org/apache/geode/management/package-summary.html">management</a></code>
+ *             package instead
  */
 public class UnmodifiableConfigurationException extends AdminException {
-private static final long serialVersionUID = -7653547392992060646L;
+  private static final long serialVersionUID = -7653547392992060646L;
 
   /**
-   * Constructs a new exception with <code>null</code> as its detail message.
-   * The cause is not initialized, and may subsequently be initialized by a
-   * call to {@link Throwable#initCause}.
+   * Constructs a new exception with <code>null</code> as its detail message.
The cause is not
+   * initialized, and may subsequently be initialized by a call to {@link Throwable#initCause}.
    */
   public UnmodifiableConfigurationException() {
     super();
   }
 
   /**
-   * Constructs a new exception with the specified detail message.  The
-   * cause is not initialized, and may subsequently be initialized by
-   * a call to {@link Throwable#initCause}.
+   * Constructs a new exception with the specified detail message. The cause is not initialized,
and
+   * may subsequently be initialized by a call to {@link Throwable#initCause}.
    *
-   * @param   message   the detail message. The detail message is saved for 
-   *          later retrieval by the {@link #getMessage()} method.
+   * @param message the detail message. The detail message is saved for later retrieval by
the
+   *        {@link #getMessage()} method.
    */
   public UnmodifiableConfigurationException(String message) {
     super(message);
   }
 
   /**
-   * Constructs a new exception with the specified detail message and
-   * cause.  <p>Note that the detail message associated with
-   * <code>cause</code> is <i>not</i> automatically incorporated
in
-   * this exception's detail message.
+   * Constructs a new exception with the specified detail message and cause.
+   * <p>
+   * Note that the detail message associated with <code>cause</code> is <i>not</i>
automatically
+   * incorporated in this exception's detail message.
    *
-   * @param  message the detail message (which is saved for later retrieval
-   *         by the {@link #getMessage()} method).
-   * @param  cause the cause (which is saved for later retrieval by the
-   *         {@link #getCause()} method).  (A <tt>null</tt> value is
-   *         permitted, and indicates that the cause is nonexistent or
-   *         unknown.)
+   * @param message the detail message (which is saved for later retrieval by the
+   *        {@link #getMessage()} method).
+   * @param cause the cause (which is saved for later retrieval by the {@link #getCause()}
method).
+   *        (A <tt>null</tt> value is permitted, and indicates that the cause
is nonexistent or
+   *        unknown.)
    */
   public UnmodifiableConfigurationException(String message, Throwable cause) {
     super(message, cause);
   }
 
   /**
-   * Constructs a new exception with the specified cause and a detail
-   * message of <tt>(cause==null ? null : cause.toString())</tt> (which
-   * typically contains the class and detail message of <tt>cause</tt>).
-   * This constructor is useful for exceptions that are little more than
-   * wrappers for other throwables (for example, {@link
-   * java.security.PrivilegedActionException}).
+   * Constructs a new exception with the specified cause and a detail message of
+   * <tt>(cause==null ? null : cause.toString())</tt> (which typically contains
the class and detail
+   * message of <tt>cause</tt>). This constructor is useful for exceptions that
are little more than
+   * wrappers for other throwables (for example, {@link java.security.PrivilegedActionException}).
    *
-   * @param  cause the cause (which is saved for later retrieval by the
-   *         {@link #getCause()} method).  (A <tt>null</tt> value is
-   *         permitted, and indicates that the cause is nonexistent or
-   *         unknown.)
+   * @param cause the cause (which is saved for later retrieval by the {@link #getCause()}
method).
+   *        (A <tt>null</tt> value is permitted, and indicates that the cause
is nonexistent or
+   *        unknown.)
    */
   public UnmodifiableConfigurationException(Throwable cause) {
     super(cause);
   }
-    
+
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/internal/AbstractHealthEvaluator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/admin/internal/AbstractHealthEvaluator.java
b/geode-core/src/main/java/org/apache/geode/admin/internal/AbstractHealthEvaluator.java
index 1a98c99..57b42a8 100644
--- a/geode-core/src/main/java/org/apache/geode/admin/internal/AbstractHealthEvaluator.java
+++ b/geode-core/src/main/java/org/apache/geode/admin/internal/AbstractHealthEvaluator.java
@@ -1,18 +1,16 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information
regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version
2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain
a
+ * copy of the License at
  *
- *      http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing, software distributed under
the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
express
+ * or implied. See the License for the specific language governing permissions and limitations
under
+ * the License.
  */
 package org.apache.geode.admin.internal;
 
@@ -28,57 +26,49 @@ import org.apache.geode.internal.logging.LogService;
 import org.apache.geode.internal.logging.log4j.LocalizedMessage;
 
 /**
- * The abstract superclass of all GemFire health evaluators.
- * Basically, this class specifies what the health evaluators need and
- * what they should do.
+ * The abstract superclass of all GemFire health evaluators. Basically, this class specifies
what
+ * the health evaluators need and what they should do.
  *
  * <P>
  *
- * Note that evaluators never reside in the administration VM, they
- * only in member VMs.  They are not <code>Serializable</code> and
- * aren't meant to be.
+ * Note that evaluators never reside in the administration VM, they only in member VMs. They
are not
+ * <code>Serializable</code> and aren't meant to be.
  *
  *
  * @since GemFire 3.5
- * */
-public abstract class AbstractHealthEvaluator  {
+ */
+public abstract class AbstractHealthEvaluator {
 
   private static final Logger logger = LogService.getLogger();
-  
-  /** The number of times this evaluator has been evaluated.  Certain
-   * checks are not made the first time an evaluation occurs.  */
+
+  /**
+   * The number of times this evaluator has been evaluated. Certain checks are not made the
first
+   * time an evaluation occurs.
+   */
   private int numEvaluations;
 
-  //////////////////////  Constructors  //////////////////////
+  ////////////////////// Constructors //////////////////////
 
   /**
    * Creates a new <code>AbstractHealthEvaluator</code> with the given
-   * <code>GemFireHealthConfig</code> and
-   * <code>DistributionManager</code>.  
+   * <code>GemFireHealthConfig</code> and <code>DistributionManager</code>.
    *
-   * Originally, this method took an
-   * <code>InternalDistributedSystem</code>, but we found there were
-   * race conditions during initialization.  Namely, that a
-   * <code>DistributionMessage</code> can be processed before the
-   * <code>InternalDistributedSystem</code>'s
-   * <code>DistributionManager</code> is set.
+   * Originally, this method took an <code>InternalDistributedSystem</code>,
but we found there were
+   * race conditions during initialization. Namely, that a <code>DistributionMessage</code>
can be
+   * processed before the <code>InternalDistributedSystem</code>'s <code>DistributionManager</code>
+   * is set.
    */
-  protected AbstractHealthEvaluator(GemFireHealthConfig config,
-                                    DM dm)
-  {
+  protected AbstractHealthEvaluator(GemFireHealthConfig config, DM dm) {
     this.numEvaluations = 0;
   }
 
-  /////////////////////  Instance Methods  /////////////////////
+  ///////////////////// Instance Methods /////////////////////
 
   /**
-   * Evaluates the health of a component of a GemFire distributed
-   * system. 
+   * Evaluates the health of a component of a GemFire distributed system.
    *
-   * @param status
-   *        A list of {@link AbstractHealthEvaluator.HealthStatus
-   *        HealthStatus} objects that is populated when ill health is
-   *        detected.
+   * @param status A list of {@link AbstractHealthEvaluator.HealthStatus HealthStatus} objects
that
+   *        is populated when ill health is detected.
    */
   public final void evaluate(List status) {
     this.numEvaluations++;
@@ -86,8 +76,7 @@ public abstract class AbstractHealthEvaluator  {
   }
 
   /**
-   * Checks the health of a component of a GemFire distributed
-   * system. 
+   * Checks the health of a component of a GemFire distributed system.
    *
    * @see #evaluate
    */
@@ -101,28 +90,28 @@ public abstract class AbstractHealthEvaluator  {
   }
 
   /**
-   * A factory method that creates a {@link
-   * AbstractHealthEvaluator.HealthStatus HealthStats} with
+   * A factory method that creates a {@link AbstractHealthEvaluator.HealthStatus HealthStats}
with
    * {@linkplain GemFireHealth#OKAY_HEALTH okay} status.
    */
   protected HealthStatus okayHealth(String diagnosis) {
-    logger.info(LocalizedMessage.create(LocalizedStrings.AbstractHealthEvaluator_OKAY_HEALTH__0,
diagnosis));
+    logger.info(LocalizedMessage.create(LocalizedStrings.AbstractHealthEvaluator_OKAY_HEALTH__0,
+        diagnosis));
     return new HealthStatus(GemFireHealth.OKAY_HEALTH, diagnosis);
   }
 
   /**
-   * A factory method that creates a {@link
-   * AbstractHealthEvaluator.HealthStatus HealthStats} with
+   * A factory method that creates a {@link AbstractHealthEvaluator.HealthStatus HealthStats}
with
    * {@linkplain GemFireHealth#POOR_HEALTH poor} status.
    */
   protected HealthStatus poorHealth(String diagnosis) {
-    logger.info(LocalizedMessage.create(LocalizedStrings.AbstractHealthEvaluator_POOR_HEALTH__0,
diagnosis));
+    logger.info(LocalizedMessage.create(LocalizedStrings.AbstractHealthEvaluator_POOR_HEALTH__0,
+        diagnosis));
     return new HealthStatus(GemFireHealth.POOR_HEALTH, diagnosis);
   }
 
   /**
-   * Returns a <code>String</code> describing the component whose
-   * health is evaluated by this evaluator.
+   * Returns a <code>String</code> describing the component whose health is evaluated
by this
+   * evaluator.
    */
   protected abstract String getDescription();
 
@@ -131,35 +120,33 @@ public abstract class AbstractHealthEvaluator  {
    */
   abstract void close();
 
-  ///////////////////////  Inner Classes  //////////////////////
+  /////////////////////// Inner Classes //////////////////////
 
   /**
    * Represents the health of a GemFire component.
    */
-  public class HealthStatus  {
+  public class HealthStatus {
     /** The health of a GemFire component */
     private GemFireHealth.Health healthCode;
 
     /** The diagnosis of the illness */
     private String diagnosis;
 
-    //////////////////////  Constructors  //////////////////////
+    ////////////////////// Constructors //////////////////////
 
     /**
-     * Creates a new <code>HealthStatus</code> with the give
-     * <code>health</code> code and <code>dianosis</code> message.
+     * Creates a new <code>HealthStatus</code> with the give <code>health</code>
code and
+     * <code>dianosis</code> message.
      *
      * @see GemFireHealth#OKAY_HEALTH
      * @see GemFireHealth#POOR_HEALTH
      */
     HealthStatus(GemFireHealth.Health healthCode, String diagnosis) {
       this.healthCode = healthCode;
-      this.diagnosis =
-        "[" + AbstractHealthEvaluator.this.getDescription() + "] " +
-        diagnosis;
+      this.diagnosis = "[" + AbstractHealthEvaluator.this.getDescription() + "] " + diagnosis;
     }
 
-    /////////////////////  Instance Methods  /////////////////////
+    ///////////////////// Instance Methods /////////////////////
 
     /**
      * Returns the health code
@@ -172,8 +159,7 @@ public abstract class AbstractHealthEvaluator  {
     }
 
     /**
-     * Returns the diagnosis prepended with a description of the
-     * component that is ill.
+     * Returns the diagnosis prepended with a description of the component that is ill.
      */
     public String getDiagnosis() {
       return this.diagnosis;


Mime
View raw message