You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by mb...@apache.org on 2016/10/21 20:31:11 UTC
[32/51] [partial] incubator-geode git commit: Added Spotless plugin
to enforce formatting standards. Added Google Java Style guide formatter
templates, removed existing formatter templates.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/LogWriter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/LogWriter.java b/geode-core/src/main/java/org/apache/geode/LogWriter.java
index 17e23e0..242433f 100644
--- a/geode-core/src/main/java/org/apache/geode/LogWriter.java
+++ b/geode-core/src/main/java/org/apache/geode/LogWriter.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;
@@ -23,278 +21,278 @@ import org.apache.geode.distributed.DistributedSystem;
import org.apache.geode.i18n.LogWriterI18n;
/**
- * Defines methods available to clients that want to write a log message
- * to their GemFire distributed system log file.
- * <p>
- * Instances of this interface can be obtained by calling
- * {@link DistributedSystem#getLogWriter}.
- * <p>
- * For any logged message the log file will contain:
- * <ul>
- * <li> The message's level.
- * <li> The time the message was logged.
- * <li> The id of the thread that logged the message.
- * <li> The message itself which can be a string and/or an exception
- * including the exception's stack trace.
- * </ul>
- * <p>
- * A message always has a level.
- * Logging levels are ordered. Enabling logging at a given level also
- * enables logging at higher levels. The higher the level the more
- * important and urgent the message.
- * <p>
- * The levels, in descending order, are:
- * <ul>
- * <li> <code>severe</code> (highest value) is a message level indicating a serious failure.
- * In general <code>severe</code> messages should describe events that
- * are of considerable importance and which will prevent normal program
- * execution. They should be reasonably intelligible to end users and
- * to information managers.
- * <li> <code>error</code>
- * In general <code>error</code> messages should describe events that
- * are of considerable importance but will not prevent normal program
- * execution. They should be reasonably intelligible to end users and
- * to information managers. They are weaker than <code>severe</code> and
- * stronger than <code>warning</code>.
- * <li> <code>warning</code> is a message level indicating a potential problem.
- * In general <code>warning</code> messages should describe events that
- * will be of interest to end users or information managers, or which indicate
- * potential problems.
- * <li> <code>info</code> is a message level for informational messages.
- * Typically <code>info</code> messages should be reasonably significant
- * and should make sense to end users and system administrators.
- * <li> <code>config</code> is a message level for static configuration messages.
- * <code>config</code> messages are intended to provide a variety of static
- * configuration information, to assist in debugging problems that may be
- * associated with particular configurations.
- * <li> <code>fine</code> is a message level providing tracing information.
- * In general the <code>fine</code> level should be used for information
- * that will be broadly interesting to developers. This level is for
- * the lowest volume, and most important, tracing messages.
- * <li> <code>finer</code> indicates a fairly detailed tracing message.
- * Logging calls for entering, returning, or throwing an exception
- * are traced at the <code>finer</code> level.
- * <li> <code>finest</code> (lowest value) indicates a highly detailed tracing message.
- * In general the <code>finest</code> level should be used for the most
- * voluminous detailed tracing messages.
- * </ul>
- * <p>
- * For each level methods exist that will request a message, at that
- * level, to be logged. These methods are all named after their level.
- * <p>
- * For each level a method exists that returns a boolean indicating
- * if messages at that level will currently be logged. The names
- * of these methods are of the form: <em>level</em><code>Enabled</code>.
- *
- */
+ * Defines methods available to clients that want to write a log message to their GemFire
+ * distributed system log file.
+ * <p>
+ * Instances of this interface can be obtained by calling {@link DistributedSystem#getLogWriter}.
+ * <p>
+ * For any logged message the log file will contain:
+ * <ul>
+ * <li>The message's level.
+ * <li>The time the message was logged.
+ * <li>The id of the thread that logged the message.
+ * <li>The message itself which can be a string and/or an exception including the exception's stack
+ * trace.
+ * </ul>
+ * <p>
+ * A message always has a level. Logging levels are ordered. Enabling logging at a given level also
+ * enables logging at higher levels. The higher the level the more important and urgent the message.
+ * <p>
+ * The levels, in descending order, are:
+ * <ul>
+ * <li><code>severe</code> (highest value) is a message level indicating a serious failure. In
+ * general <code>severe</code> messages should describe events that are of considerable importance
+ * and which will prevent normal program execution. They should be reasonably intelligible to end
+ * users and to information managers.
+ * <li><code>error</code> In general <code>error</code> messages should describe events that are of
+ * considerable importance but will not prevent normal program execution. They should be reasonably
+ * intelligible to end users and to information managers. They are weaker than <code>severe</code>
+ * and stronger than <code>warning</code>.
+ * <li><code>warning</code> is a message level indicating a potential problem. In general
+ * <code>warning</code> messages should describe events that will be of interest to end users or
+ * information managers, or which indicate potential problems.
+ * <li><code>info</code> is a message level for informational messages. Typically <code>info</code>
+ * messages should be reasonably significant and should make sense to end users and system
+ * administrators.
+ * <li><code>config</code> is a message level for static configuration messages. <code>config</code>
+ * messages are intended to provide a variety of static configuration information, to assist in
+ * debugging problems that may be associated with particular configurations.
+ * <li><code>fine</code> is a message level providing tracing information. In general the
+ * <code>fine</code> level should be used for information that will be broadly interesting to
+ * developers. This level is for the lowest volume, and most important, tracing messages.
+ * <li><code>finer</code> indicates a fairly detailed tracing message. Logging calls for entering,
+ * returning, or throwing an exception are traced at the <code>finer</code> level.
+ * <li><code>finest</code> (lowest value) indicates a highly detailed tracing message. In general
+ * the <code>finest</code> level should be used for the most voluminous detailed tracing messages.
+ * </ul>
+ * <p>
+ * For each level methods exist that will request a message, at that level, to be logged. These
+ * methods are all named after their level.
+ * <p>
+ * For each level a method exists that returns a boolean indicating if messages at that level will
+ * currently be logged. The names of these methods are of the form:
+ * <em>level</em><code>Enabled</code>.
+ *
+ */
public interface LogWriter {
-
- /**
- * Returns true if "severe" log messages are enabled.
- * Returns false if "severe" log messages are disabled.
- */
- public boolean severeEnabled();
- /**
- * Writes both a message and exception to this writer.
- * The message level is "severe".
- */
- public void severe(String msg, Throwable ex);
- /**
- * Writes a message to this writer.
- * The message level is "severe".
- */
- public void severe(String msg);
- /**
- * Writes an exception to this writer.
- * The exception level is "severe".
- */
- public void severe(Throwable ex);
- /**
- * Returns true if "error" log messages are enabled.
- * Returns false if "error" log messages are disabled.
- */
- public boolean errorEnabled();
- /**
- * Writes both a message and exception to this writer.
- * The message level is "error".
- */
- public void error(String msg, Throwable ex);
- /**
- * Writes a message to this writer.
- * The message level is "error".
- */
- public void error(String msg);
- /**
- * Writes an exception to this writer.
- * The exception level is "error".
- */
- public void error(Throwable ex);
- /**
- * Returns true if "warning" log messages are enabled.
- * Returns false if "warning" log messages are disabled.
- */
- public boolean warningEnabled();
- /**
- * Writes both a message and exception to this writer.
- * The message level is "warning".
- */
- public void warning(String msg, Throwable ex);
- /**
- * Writes a message to this writer.
- * The message level is "warning".
- */
- public void warning(String msg);
- /**
- * Writes an exception to this writer.
- * The exception level is "warning".
- */
- public void warning(Throwable ex);
- /**
- * Returns true if "info" log messages are enabled.
- * Returns false if "info" log messages are disabled.
- */
- public boolean infoEnabled();
- /**
- * Writes both a message and exception to this writer.
- * The message level is "information".
- */
- public void info(String msg, Throwable ex);
- /**
- * Writes a message to this writer.
- * The message level is "information".
- */
- public void info(String msg);
- /**
- * Writes an exception to this writer.
- * The exception level is "information".
- */
- public void info(Throwable ex);
- /**
- * Returns true if "config" log messages are enabled.
- * Returns false if "config" log messages are disabled.
- */
- public boolean configEnabled();
- /**
- * Writes both a message and exception to this writer.
- * The message level is "config".
- */
- public void config(String msg, Throwable ex);
- /**
- * Writes a message to this writer.
- * The message level is "config".
- */
- public void config(String msg);
- /**
- * Writes an exception to this writer.
- * The exception level is "config".
- */
- public void config(Throwable ex);
- /**
- * Returns true if "fine" log messages are enabled.
- * Returns false if "fine" log messages are disabled.
- */
- public boolean fineEnabled();
- /**
- * Writes both a message and exception to this writer.
- * The message level is "fine".
- */
- public void fine(String msg, Throwable ex);
- /**
- * Writes a message to this writer.
- * The message level is "fine".
- */
- public void fine(String msg);
- /**
- * Writes an exception to this writer.
- * The exception level is "fine".
- */
- public void fine(Throwable ex);
- /**
- * Returns true if "finer" log messages are enabled.
- * Returns false if "finer" log messages are disabled.
- */
- public boolean finerEnabled();
- /**
- * Writes both a message and exception to this writer.
- * The message level is "finer".
- */
- public void finer(String msg, Throwable ex);
- /**
- * Writes a message to this writer.
- * The message level is "finer".
- */
- public void finer(String msg);
- /**
- * Writes an exception to this writer.
- * The exception level is "finer".
- */
- public void finer(Throwable ex);
- /**
- * Log a method entry.
- * <p>The logging is done using the <code>finer</code> level.
- * The string message will start with <code>"ENTRY"</code> and
- * include the class and method names.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method that issued the logging request.
- */
- public void entering(String sourceClass, String sourceMethod);
- /**
- * Log a method return.
- * <p>The logging is done using the <code>finer</code> level.
- * The string message will start with <code>"RETURN"</code> and
- * include the class and method names.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method that issued the logging request.
- */
- public void exiting(String sourceClass, String sourceMethod);
- /**
- * Log throwing an exception.
- * <p> Use to log that a method is
- * terminating by throwing an exception. The logging is done using
- * the <code>finer</code> level.
- * <p> This is a convenience method that could be done
- * instead by calling {@link #finer(String, Throwable)}.
- * The string message will start with <code>"THROW"</code> and
- * include the class and method names.
- * @param sourceClass Name of class that issued the logging request.
- * @param sourceMethod Name of the method that issued the logging request.
- * @param thrown The Throwable that is being thrown.
- */
- public void throwing(String sourceClass, String sourceMethod,
- Throwable thrown);
- /**
- * Returns true if "finest" log messages are enabled.
- * Returns false if "finest" log messages are disabled.
- */
- public boolean finestEnabled();
- /**
- * Writes both a message and exception to this writer.
- * The message level is "finest".
- */
- public void finest(String msg, Throwable ex);
- /**
- * Writes a message to this writer.
- * The message level is "finest".
- */
- public void finest(String msg);
- /**
- * Writes an exception to this writer.
- * The exception level is "finest".
- */
- public void finest(Throwable ex);
-
- /**
- * Returns a 1.4 logging handler that can be used to direct application
- * output to this GemFire logger using the standard JDK logger APIs.
- * Each time this method is called it creates a new instance of a
- * Handler so care should be taken to not call this method too often.
- */
- public Handler getHandler();
-
- /**
- * A mechanism for accessing the abstraction layer used for
- * internationalization.
- * @return LogWriterI18n
- */
- public LogWriterI18n convertToLogWriterI18n();
+
+ /**
+ * Returns true if "severe" log messages are enabled. Returns false if "severe" log messages are
+ * disabled.
+ */
+ public boolean severeEnabled();
+
+ /**
+ * Writes both a message and exception to this writer. The message level is "severe".
+ */
+ public void severe(String msg, Throwable ex);
+
+ /**
+ * Writes a message to this writer. The message level is "severe".
+ */
+ public void severe(String msg);
+
+ /**
+ * Writes an exception to this writer. The exception level is "severe".
+ */
+ public void severe(Throwable ex);
+
+ /**
+ * Returns true if "error" log messages are enabled. Returns false if "error" log messages are
+ * disabled.
+ */
+ public boolean errorEnabled();
+
+ /**
+ * Writes both a message and exception to this writer. The message level is "error".
+ */
+ public void error(String msg, Throwable ex);
+
+ /**
+ * Writes a message to this writer. The message level is "error".
+ */
+ public void error(String msg);
+
+ /**
+ * Writes an exception to this writer. The exception level is "error".
+ */
+ public void error(Throwable ex);
+
+ /**
+ * Returns true if "warning" log messages are enabled. Returns false if "warning" log messages are
+ * disabled.
+ */
+ public boolean warningEnabled();
+
+ /**
+ * Writes both a message and exception to this writer. The message level is "warning".
+ */
+ public void warning(String msg, Throwable ex);
+
+ /**
+ * Writes a message to this writer. The message level is "warning".
+ */
+ public void warning(String msg);
+
+ /**
+ * Writes an exception to this writer. The exception level is "warning".
+ */
+ public void warning(Throwable ex);
+
+ /**
+ * Returns true if "info" log messages are enabled. Returns false if "info" log messages are
+ * disabled.
+ */
+ public boolean infoEnabled();
+
+ /**
+ * Writes both a message and exception to this writer. The message level is "information".
+ */
+ public void info(String msg, Throwable ex);
+
+ /**
+ * Writes a message to this writer. The message level is "information".
+ */
+ public void info(String msg);
+
+ /**
+ * Writes an exception to this writer. The exception level is "information".
+ */
+ public void info(Throwable ex);
+
+ /**
+ * Returns true if "config" log messages are enabled. Returns false if "config" log messages are
+ * disabled.
+ */
+ public boolean configEnabled();
+
+ /**
+ * Writes both a message and exception to this writer. The message level is "config".
+ */
+ public void config(String msg, Throwable ex);
+
+ /**
+ * Writes a message to this writer. The message level is "config".
+ */
+ public void config(String msg);
+
+ /**
+ * Writes an exception to this writer. The exception level is "config".
+ */
+ public void config(Throwable ex);
+
+ /**
+ * Returns true if "fine" log messages are enabled. Returns false if "fine" log messages are
+ * disabled.
+ */
+ public boolean fineEnabled();
+
+ /**
+ * Writes both a message and exception to this writer. The message level is "fine".
+ */
+ public void fine(String msg, Throwable ex);
+
+ /**
+ * Writes a message to this writer. The message level is "fine".
+ */
+ public void fine(String msg);
+
+ /**
+ * Writes an exception to this writer. The exception level is "fine".
+ */
+ public void fine(Throwable ex);
+
+ /**
+ * Returns true if "finer" log messages are enabled. Returns false if "finer" log messages are
+ * disabled.
+ */
+ public boolean finerEnabled();
+
+ /**
+ * Writes both a message and exception to this writer. The message level is "finer".
+ */
+ public void finer(String msg, Throwable ex);
+
+ /**
+ * Writes a message to this writer. The message level is "finer".
+ */
+ public void finer(String msg);
+
+ /**
+ * Writes an exception to this writer. The exception level is "finer".
+ */
+ public void finer(Throwable ex);
+
+ /**
+ * Log a method entry.
+ * <p>
+ * The logging is done using the <code>finer</code> level. The string message will start with
+ * <code>"ENTRY"</code> and include the class and method names.
+ *
+ * @param sourceClass Name of class that issued the logging request.
+ * @param sourceMethod Name of the method that issued the logging request.
+ */
+ public void entering(String sourceClass, String sourceMethod);
+
+ /**
+ * Log a method return.
+ * <p>
+ * The logging is done using the <code>finer</code> level. The string message will start with
+ * <code>"RETURN"</code> and include the class and method names.
+ *
+ * @param sourceClass Name of class that issued the logging request.
+ * @param sourceMethod Name of the method that issued the logging request.
+ */
+ public void exiting(String sourceClass, String sourceMethod);
+
+ /**
+ * Log throwing an exception.
+ * <p>
+ * Use to log that a method is terminating by throwing an exception. The logging is done using the
+ * <code>finer</code> level.
+ * <p>
+ * This is a convenience method that could be done instead by calling
+ * {@link #finer(String, Throwable)}. The string message will start with <code>"THROW"</code> and
+ * include the class and method names.
+ *
+ * @param sourceClass Name of class that issued the logging request.
+ * @param sourceMethod Name of the method that issued the logging request.
+ * @param thrown The Throwable that is being thrown.
+ */
+ public void throwing(String sourceClass, String sourceMethod, Throwable thrown);
+
+ /**
+ * Returns true if "finest" log messages are enabled. Returns false if "finest" log messages are
+ * disabled.
+ */
+ public boolean finestEnabled();
+
+ /**
+ * Writes both a message and exception to this writer. The message level is "finest".
+ */
+ public void finest(String msg, Throwable ex);
+
+ /**
+ * Writes a message to this writer. The message level is "finest".
+ */
+ public void finest(String msg);
+
+ /**
+ * Writes an exception to this writer. The exception level is "finest".
+ */
+ public void finest(Throwable ex);
+
+ /**
+ * Returns a 1.4 logging handler that can be used to direct application output to this GemFire
+ * logger using the standard JDK logger APIs. Each time this method is called it creates a new
+ * instance of a Handler so care should be taken to not call this method too often.
+ */
+ public Handler getHandler();
+
+ /**
+ * A mechanism for accessing the abstraction layer used for internationalization.
+ *
+ * @return LogWriterI18n
+ */
+ public LogWriterI18n convertToLogWriterI18n();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/NoSystemException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/NoSystemException.java b/geode-core/src/main/java/org/apache/geode/NoSystemException.java
index 215e157..07b3c0e 100644
--- a/geode-core/src/main/java/org/apache/geode/NoSystemException.java
+++ b/geode-core/src/main/java/org/apache/geode/NoSystemException.java
@@ -1,36 +1,33 @@
/*
- * 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;
/**
- * A <code>NoSystemException</code> is thrown when a
- * locator can not be found or connected to.
- * In most cases one of the following subclasses is used instead
- * of <code>NoSystemException</code>:
+ * A <code>NoSystemException</code> is thrown when a locator can not be found or connected to. In
+ * most cases one of the following subclasses is used instead of <code>NoSystemException</code>:
* <ul>
- * <li> {@link UncreatedSystemException}
- * <li> {@link UnstartedSystemException}
+ * <li>{@link UncreatedSystemException}
+ * <li>{@link UnstartedSystemException}
* </ul>
- * <p>As of GemFire 5.0 this exception should be named NoLocatorException.
+ * <p>
+ * As of GemFire 5.0 this exception should be named NoLocatorException.
*/
public class NoSystemException extends GemFireException {
-private static final long serialVersionUID = -101890149467219630L;
+ private static final long serialVersionUID = -101890149467219630L;
- ////////////////////// Constructors //////////////////////
+ ////////////////////// Constructors //////////////////////
/**
* Creates a new <code>NoSystemException</code>.
@@ -38,11 +35,11 @@ private static final long serialVersionUID = -101890149467219630L;
public NoSystemException(String message) {
super(message);
}
+
/**
- * Creates a new <code>NoSystemException</code> with the given message
- * and cause.
+ * Creates a new <code>NoSystemException</code> with the given message and cause.
*/
public NoSystemException(String message, Throwable cause) {
- super(message, cause);
+ super(message, cause);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/OutOfOffHeapMemoryException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/OutOfOffHeapMemoryException.java b/geode-core/src/main/java/org/apache/geode/OutOfOffHeapMemoryException.java
index 2dc105c..323cd84 100755
--- a/geode-core/src/main/java/org/apache/geode/OutOfOffHeapMemoryException.java
+++ b/geode-core/src/main/java/org/apache/geode/OutOfOffHeapMemoryException.java
@@ -1,25 +1,22 @@
/*
- * 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;
/**
- * Indicates that attempts to allocate more objects in off-heap memory has
- * failed and the Cache will be closed to prevent it from losing distributed
- * consistency.
+ * Indicates that attempts to allocate more objects in off-heap memory has failed and the Cache will
+ * be closed to prevent it from losing distributed consistency.
*
*/
public class OutOfOffHeapMemoryException extends CancelException {
@@ -28,14 +25,12 @@ public class OutOfOffHeapMemoryException extends CancelException {
/**
* Constructs an <code>OutOfOffHeapMemoryError</code> with no detail message.
*/
- public OutOfOffHeapMemoryException() {
- }
+ public OutOfOffHeapMemoryException() {}
/**
- * Constructs an <code>OutOfOffHeapMemoryError</code> with the specified
- * detail message.
+ * Constructs an <code>OutOfOffHeapMemoryError</code> with the specified detail message.
*
- * @param message the detail message.
+ * @param message the detail message.
*/
public OutOfOffHeapMemoryException(String message) {
super(message);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/SerializationException.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/SerializationException.java b/geode-core/src/main/java/org/apache/geode/SerializationException.java
index 592ff38..4e82b26 100644
--- a/geode-core/src/main/java/org/apache/geode/SerializationException.java
+++ b/geode-core/src/main/java/org/apache/geode/SerializationException.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;
@@ -20,13 +18,16 @@ import org.apache.geode.GemFireIOException;
/**
* An exception indicating that a serialization or deserialization failed.
+ *
* @since GemFire 5.7
*/
public class SerializationException extends GemFireIOException {
-private static final long serialVersionUID = 7783018024920098997L;
+ private static final long serialVersionUID = 7783018024920098997L;
+
/**
*
* Create a new instance of SerializationException with a detail message
+ *
* @param message the detail message
*/
public SerializationException(String message) {
@@ -35,6 +36,7 @@ private static final long serialVersionUID = 7783018024920098997L;
/**
* Create a new instance of SerializationException with a detail message and cause
+ *
* @param message the detail message
* @param cause the cause
*/
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/StatisticDescriptor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/StatisticDescriptor.java b/geode-core/src/main/java/org/apache/geode/StatisticDescriptor.java
index 010565c..fba2878 100644
--- a/geode-core/src/main/java/org/apache/geode/StatisticDescriptor.java
+++ b/geode-core/src/main/java/org/apache/geode/StatisticDescriptor.java
@@ -1,32 +1,28 @@
/*
- * 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;
-//import org.apache.geode.internal.Assert;
-//import org.apache.geode.internal.FieldInfo;
+// import org.apache.geode.internal.Assert;
+// import org.apache.geode.internal.FieldInfo;
/**
- * Describes an individual statistic whose value is updated by an
- * application and may be archived by GemFire. These descriptions are
- * gathered together in a {@link StatisticsType}.
+ * Describes an individual statistic whose value is updated by an application and may be archived by
+ * GemFire. These descriptions are gathered together in a {@link StatisticsType}.
*
* <P>
- * To get an instance of this interface use an instance of
- * {@link StatisticsFactory}.
+ * To get an instance of this interface use an instance of {@link StatisticsFactory}.
* <P>
* <code>StatisticDescriptor</code>s are naturally ordered by their name.
*
@@ -35,15 +31,13 @@ package org.apache.geode;
*/
public interface StatisticDescriptor extends Comparable<StatisticDescriptor> {
- //////////////////// Instance Methods ////////////////////
+ //////////////////// Instance Methods ////////////////////
/**
- * Returns the id of this statistic in a {@link StatisticsType
- * statistics type}. The id is initialized when its statistics
- * type is created.
+ * Returns the id of this statistic in a {@link StatisticsType statistics type}. The id is
+ * initialized when its statistics type is created.
*
- * @throws IllegalStateException
- * The id has not been initialized yet
+ * @throws IllegalStateException The id has not been initialized yet
*/
public int getId();
@@ -63,9 +57,8 @@ public interface StatisticDescriptor extends Comparable<StatisticDescriptor> {
public Class<?> getType();
/**
- * Returns true if this statistic is a counter; false if its a gauge.
- * Counter statistics have values that always increase.
- * Gauge statistics have unconstrained values.
+ * Returns true if this statistic is a counter; false if its a gauge. Counter statistics have
+ * values that always increase. Gauge statistics have unconstrained values.
*/
public boolean isCounter();
@@ -73,6 +66,7 @@ public interface StatisticDescriptor extends Comparable<StatisticDescriptor> {
* Returns true if a larger statistic value indicates better performance.
*/
public boolean isLargerBetter();
+
/**
* Returns the unit in which this statistic is measured
*/
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/Statistics.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/Statistics.java b/geode-core/src/main/java/org/apache/geode/Statistics.java
index b8ffc06..cd37648 100644
--- a/geode-core/src/main/java/org/apache/geode/Statistics.java
+++ b/geode-core/src/main/java/org/apache/geode/Statistics.java
@@ -1,51 +1,45 @@
/*
- * 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;
-//import org.apache.geode.distributed.DistributedSystem;
+// import org.apache.geode.distributed.DistributedSystem;
import java.util.function.DoubleSupplier;
import java.util.function.IntSupplier;
import java.util.function.LongSupplier;
/**
- * Instances of this interface maintain the values of various application-defined
- * statistics. The statistics themselves are described by an instance
- * of {@link StatisticsType}.
+ * Instances of this interface maintain the values of various application-defined statistics. The
+ * statistics themselves are described by an instance of {@link StatisticsType}.
*
* <P>
- * To get an instance of this interface use an instance of
- * {@link StatisticsFactory}.
+ * To get an instance of this interface use an instance of {@link StatisticsFactory}.
* <P>
*
- * For improved performance, each statistic may be referred to by
- * its {@link #nameToDescriptor descriptor}.
+ * For improved performance, each statistic may be referred to by its {@link #nameToDescriptor
+ * descriptor}.
* <P>
- * For optimal performance, each statistic may be referred to by
- * its {@link #nameToId id} in the statistics object. Note that
- * ids can not be mapped back to their name and methods that take ids
- * are unsafe. It is important to call the correct type of method
- * for the given id. For example if your stat is a long then incLong
- * must be called instead of incInt.
- * <p>Note that as of the 5.1 release the <code>incInt</code>,
- * <code>incLong</code>, and <code>incDouble</code> methods no longer
- * return the new value of the statistic. They now return <code>void</code>.
- * This incompatible change was made
- * to allow for a more efficient concurrent increment implementation.
+ * For optimal performance, each statistic may be referred to by its {@link #nameToId id} in the
+ * statistics object. Note that ids can not be mapped back to their name and methods that take ids
+ * are unsafe. It is important to call the correct type of method for the given id. For example if
+ * your stat is a long then incLong must be called instead of incInt.
+ * <p>
+ * Note that as of the 5.1 release the <code>incInt</code>, <code>incLong</code>, and
+ * <code>incDouble</code> methods no longer return the new value of the statistic. They now return
+ * <code>void</code>. This incompatible change was made to allow for a more efficient concurrent
+ * increment implementation.
* <P>
*
* @see <A href="package-summary.html#statistics">Package introduction</A>
@@ -57,35 +51,30 @@ import java.util.function.LongSupplier;
public interface Statistics {
/**
- * Closes these statistics. After statistics have been closed, they
- * are no longer archived.
- * A value access on a closed statistics always results in zero.
- * A value modification on a closed statistics is ignored.
+ * Closes these statistics. After statistics have been closed, they are no longer archived. A
+ * value access on a closed statistics always results in zero. A value modification on a closed
+ * statistics is ignored.
*/
public void close();
- //////////////////////// accessor Methods ///////////////////////
+ //////////////////////// accessor Methods ///////////////////////
/**
- * Returns the id of the statistic with the given name in this
- * statistics instance.
+ * Returns the id of the statistic with the given name in this statistics instance.
*
- * @throws IllegalArgumentException
- * No statistic named <code>name</code> exists in this
- * statistics instance.
+ * @throws IllegalArgumentException No statistic named <code>name</code> exists in this statistics
+ * instance.
*
* @see StatisticsType#nameToId
*/
public int nameToId(String name);
-
+
/**
- * Returns the descriptor of the statistic with the given name in this
- * statistics instance.
+ * Returns the descriptor of the statistic with the given name in this statistics instance.
*
- * @throws IllegalArgumentException
- * No statistic named <code>name</code> exists in this
- * statistics instance.
+ * @throws IllegalArgumentException No statistic named <code>name</code> exists in this statistics
+ * instance.
*
* @see StatisticsType#nameToDescriptor
*/
@@ -100,160 +89,139 @@ public interface Statistics {
* Gets the {@link StatisticsType} of this instance.
*/
public StatisticsType getType();
+
/**
* Gets the text associated with this instance that helps identify it.
*/
public String getTextId();
+
/**
* Gets the number associated with this instance that helps identify it.
*/
public long getNumericId();
+
/**
- * Returns true if modifications are atomic. This means that multiple threads,
- * can safely modify this instance without extra synchronization.
+ * Returns true if modifications are atomic. This means that multiple threads, can safely modify
+ * this instance without extra synchronization.
* <p>
- * Returns false if modifications are not atomic. This means that modifications
- * to this instance are cheaper but not thread safe.
+ * Returns false if modifications are not atomic. This means that modifications to this instance
+ * are cheaper but not thread safe.
*/
public boolean isAtomic();
+
/**
* Returns true if the instance has been {@link #close closed}.
*/
public boolean isClosed();
-
- //////////////////////// set() Methods ///////////////////////
+
+ //////////////////////// set() Methods ///////////////////////
/**
- * Sets the value of a statistic with the given <code>id</code>
- * whose type is <code>int</code>.
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
+ * Sets the value of a statistic with the given <code>id</code> whose type is <code>int</code>.
+ *
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
*
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public void setInt(int id, int value);
/**
* Sets the value of a named statistic of type <code>int</code>
*
- * @throws IllegalArgumentException
- * If no statistic exists named <code>name</code> or
- * if the statistic with name <code>name</code> is not of
- * type <code>int</code>.
+ * @throws IllegalArgumentException If no statistic exists named <code>name</code> or if the
+ * statistic with name <code>name</code> is not of type <code>int</code>.
*/
public void setInt(String name, int value);
/**
* Sets the value of a described statistic of type <code>int</code>
*
- * @throws IllegalArgumentException
- * If no statistic exists for the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>int</code>.
+ * @throws IllegalArgumentException If no statistic exists for the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>int</code>.
*/
public void setInt(StatisticDescriptor descriptor, int value);
/**
- * Sets the value of a statistic with the given <code>id</code>
- * whose type is <code>long</code>.
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
+ * Sets the value of a statistic with the given <code>id</code> whose type is <code>long</code>.
+ *
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
*
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public void setLong(int id, long value);
/**
* Sets the value of a described statistic of type <code>long</code>
*
- * @throws IllegalArgumentException
- * If no statistic exists for the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>long</code>.
+ * @throws IllegalArgumentException If no statistic exists for the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>long</code>.
*/
public void setLong(StatisticDescriptor descriptor, long value);
/**
* Sets the value of a named statistic of type <code>long</code>.
*
- * @throws IllegalArgumentException
- * If no statistic exists named <code>name</code> or
- * if the statistic with name <code>name</code> is not of
- * type <code>long</code>.
+ * @throws IllegalArgumentException If no statistic exists named <code>name</code> or if the
+ * statistic with name <code>name</code> is not of type <code>long</code>.
*/
public void setLong(String name, long value);
/**
- * Sets the value of a statistic with the given <code>id</code>
- * whose type is <code>double</code>.
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
+ * Sets the value of a statistic with the given <code>id</code> whose type is <code>double</code>.
+ *
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
*
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public void setDouble(int id, double value);
/**
* Sets the value of a described statistic of type <code>double</code>
*
- * @throws IllegalArgumentException
- * If no statistic exists for the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>double</code>.
+ * @throws IllegalArgumentException If no statistic exists for the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>double</code>.
*/
public void setDouble(StatisticDescriptor descriptor, double value);
+
/**
* Sets the value of a named statistic of type <code>double</code>.
*
- * @throws IllegalArgumentException
- * If no statistic exists named <code>name</code> or
- * if the statistic with name <code>name</code> is not of
- * type <code>double</code>.
+ * @throws IllegalArgumentException If no statistic exists named <code>name</code> or if the
+ * statistic with name <code>name</code> is not of type <code>double</code>.
*/
public void setDouble(String name, double value);
- /////////////////////// get() Methods ///////////////////////
+ /////////////////////// get() Methods ///////////////////////
/**
* Returns the value of the identified statistic of type <code>int</code>.
*
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public int getInt(int id);
/**
* Returns the value of the described statistic of type <code>int</code>.
*
- * @throws IllegalArgumentException
- * If no statistic exists with the specified <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>int</code>.
+ * @throws IllegalArgumentException If no statistic exists with the specified
+ * <code>descriptor</code> or if the described statistic is not of type <code>int</code>.
*/
public int getInt(StatisticDescriptor descriptor);
+
/**
- * Returns the value of the statistic of type <code>int</code> at
- * the given name.
+ * Returns the value of the statistic of type <code>int</code> at the given name.
*
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>int</code>.
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>int</code>.
*/
public int getInt(String name);
/**
* Returns the value of the identified statistic of type <code>long</code>.
*
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public long getLong(int id);
@@ -261,426 +229,387 @@ public interface Statistics {
/**
* Returns the value of the described statistic of type <code>long</code>.
*
- * @throws IllegalArgumentException
- * If no statistic exists with the specified <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>long</code>.
+ * @throws IllegalArgumentException If no statistic exists with the specified
+ * <code>descriptor</code> or if the described statistic is not of type <code>long</code>.
*/
public long getLong(StatisticDescriptor descriptor);
+
/**
- * Returns the value of the statistic of type <code>long</code> at
- * the given name.
+ * Returns the value of the statistic of type <code>long</code> at the given name.
*
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>long</code>.
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>long</code>.
*/
public long getLong(String name);
/**
* Returns the value of the identified statistic of type <code>double</code>.
*
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public double getDouble(int id);
/**
* Returns the value of the described statistic of type <code>double</code>.
*
- * @throws IllegalArgumentException
- * If no statistic exists with the specified <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>double</code>.
+ * @throws IllegalArgumentException If no statistic exists with the specified
+ * <code>descriptor</code> or if the described statistic is not of type
+ * <code>double</code>.
*/
public double getDouble(StatisticDescriptor descriptor);
+
/**
- * Returns the value of the statistic of type <code>double</code> at
- * the given name.
+ * Returns the value of the statistic of type <code>double</code> at the given name.
*
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>double</code>.
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>double</code>.
*/
public double getDouble(String name);
/**
* Returns the value of the identified statistic.
*
- * @param descriptor a statistic descriptor obtained with {@link #nameToDescriptor}
- * or {@link StatisticsType#nameToDescriptor}.
- * @throws IllegalArgumentException
- * If the described statistic does not exist
+ * @param descriptor a statistic descriptor obtained with {@link #nameToDescriptor} or
+ * {@link StatisticsType#nameToDescriptor}.
+ * @throws IllegalArgumentException If the described statistic does not exist
*/
public Number get(StatisticDescriptor descriptor);
/**
* Returns the value of the named statistic.
*
- * @throws IllegalArgumentException
- * If the named statistic does not exist
+ * @throws IllegalArgumentException If the named statistic does not exist
*/
public Number get(String name);
/**
* Returns the bits that represent the raw value of the described statistic.
*
- * @param descriptor a statistic descriptor obtained with {@link #nameToDescriptor}
- * or {@link StatisticsType#nameToDescriptor}.
- * @throws IllegalArgumentException
- * If the described statistic does not exist
+ * @param descriptor a statistic descriptor obtained with {@link #nameToDescriptor} or
+ * {@link StatisticsType#nameToDescriptor}.
+ * @throws IllegalArgumentException If the described statistic does not exist
*/
public long getRawBits(StatisticDescriptor descriptor);
/**
* Returns the bits that represent the raw value of the named statistic.
*
- * @throws IllegalArgumentException
- * If the named statistic does not exist
+ * @throws IllegalArgumentException If the named statistic does not exist
*/
public long getRawBits(String name);
- //////////////////////// inc() Methods ////////////////////////
+ //////////////////////// inc() Methods ////////////////////////
/**
- * Increments the value of the identified statistic of type <code>int</code>
- * by the given amount.
+ * Increments the value of the identified statistic of type <code>int</code> by the given amount.
*
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
*
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public void incInt(int id, int delta);
/**
- * Increments the value of the described statistic of type <code>int</code>
- * by the given amount.
+ * Increments the value of the described statistic of type <code>int</code> by the given amount.
*
- * @throws IllegalArgumentException
- * If no statistic exists with the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>int</code>.
+ * @throws IllegalArgumentException If no statistic exists with the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>int</code>.
*/
public void incInt(StatisticDescriptor descriptor, int delta);
/**
- * Increments the value of the statistic of type <code>int</code> with
- * the given name by a given amount.
+ * Increments the value of the statistic of type <code>int</code> with the given name by a given
+ * amount.
*
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>int</code>.
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>int</code>.
*/
public void incInt(String name, int delta);
/**
- * Increments the value of the identified statistic of type <code>long</code>
- * by the given amount.
+ * Increments the value of the identified statistic of type <code>long</code> by the given amount.
*
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
*
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public void incLong(int id, long delta);
/**
- * Increments the value of the described statistic of type <code>long</code>
- * by the given amount.
+ * Increments the value of the described statistic of type <code>long</code> by the given amount.
*
- * @throws IllegalArgumentException
- * If no statistic exists with the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>long</code>.
+ * @throws IllegalArgumentException If no statistic exists with the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>long</code>.
*/
public void incLong(StatisticDescriptor descriptor, long delta);
+
/**
- * Increments the value of the statistic of type <code>long</code> with
- * the given name by a given amount.
+ * Increments the value of the statistic of type <code>long</code> with the given name by a given
+ * amount.
*
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>long</code>.
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>long</code>.
*/
public void incLong(String name, long delta);
/**
- * Increments the value of the identified statistic of type <code>double</code>
- * by the given amount.
+ * Increments the value of the identified statistic of type <code>double</code> by the given
+ * amount.
*
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
*
- * @throws ArrayIndexOutOfBoundsException
- * If the id is invalid.
+ * @throws ArrayIndexOutOfBoundsException If the id is invalid.
*/
public void incDouble(int id, double delta);
/**
- * Increments the value of the described statistic of type <code>double</code>
- * by the given amount.
+ * Increments the value of the described statistic of type <code>double</code> by the given
+ * amount.
*
- * @throws IllegalArgumentException
- * If no statistic exists with the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>double</code>.
+ * @throws IllegalArgumentException If no statistic exists with the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>double</code>.
*/
public void incDouble(StatisticDescriptor descriptor, double delta);
+
/**
- * Increments the value of the statistic of type <code>double</code> with
- * the given name by a given amount.
+ * Increments the value of the statistic of type <code>double</code> with the given name by a
+ * given amount.
*
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>double</code>.
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>double</code>.
*/
public void incDouble(String name, double delta);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by long running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by long running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
* @throws IllegalArgumentException If the id is invalid.
* @since Geode 1.0
*/
public IntSupplier setIntSupplier(int id, IntSupplier supplier);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by long running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by long running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
* @param name the name of the statistic to update
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>int</code>.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>int</code>.
* @since Geode 1.0
*/
public IntSupplier setIntSupplier(String name, IntSupplier supplier);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by long running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by long running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
* @param descriptor the descriptor of the statistic to update
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
- * @throws IllegalArgumentException
- * If no statistic exists with the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>int</code>.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
+ * @throws IllegalArgumentException If no statistic exists with the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>int</code>.
* @since Geode 1.0
*/
public IntSupplier setIntSupplier(StatisticDescriptor descriptor, IntSupplier supplier);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by long running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by long running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
* @throws IllegalArgumentException If the id is invalid.
* @since Geode 1.0
*/
public LongSupplier setLongSupplier(int id, LongSupplier supplier);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by long running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by long running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
* @param name the name of the statistic to update
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>long</code>.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>long</code>.
*/
public LongSupplier setLongSupplier(String name, LongSupplier supplier);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by long running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by long running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
* @param descriptor the descriptor of the statistic to update
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
- * @throws IllegalArgumentException
- * If no statistic exists with the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>long</code>.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
+ * @throws IllegalArgumentException If no statistic exists with the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>long</code>.
* @since Geode 1.0
*/
public LongSupplier setLongSupplier(StatisticDescriptor descriptor, LongSupplier supplier);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by double running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by double running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
- * @param id a statistic id obtained with {@link #nameToId}
- * or {@link StatisticsType#nameToId}.
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
+ * @param id a statistic id obtained with {@link #nameToId} or {@link StatisticsType#nameToId}.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
* @throws IllegalArgumentException If the id is invalid.
* @since Geode 1.0
*/
public DoubleSupplier setDoubleSupplier(int id, DoubleSupplier supplier);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by double running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by double running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
* @param name the name of the statistic to update
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
- * @throws IllegalArgumentException
- * If no statistic exists with name <code>name</code> or
- * if the statistic named <code>name</code> is not of
- * type <code>double</code>.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
+ * @throws IllegalArgumentException If no statistic exists with name <code>name</code> or if the
+ * statistic named <code>name</code> is not of type <code>double</code>.
* @since Geode 1.0
*/
public DoubleSupplier setDoubleSupplier(String name, DoubleSupplier supplier);
/**
- * Provide a callback to compute the value of this statistic
- * every sample interval and use that as the value of the stat.
+ * Provide a callback to compute the value of this statistic every sample interval and use that as
+ * the value of the stat.
* <p>
- * The callback should return quickly because it is invoked on a shared thread.
- * It should not do any expensive computations, network calls, or access any resources
- * under locks that may be locked by double running processes.
+ * The callback should return quickly because it is invoked on a shared thread. It should not do
+ * any expensive computations, network calls, or access any resources under locks that may be
+ * locked by double running processes.
* <p>
* This callback will only be invoked if the distributed system property
- * statistic-sampling-enabled is set to true, and it will be invoked at intervals
- * determined by the statistic-sampling-rate.
+ * statistic-sampling-enabled is set to true, and it will be invoked at intervals determined by
+ * the statistic-sampling-rate.
* <p>
- * Get methods are not guaranteed to recompute a new value, they may return
- * the last sampled value
+ * Get methods are not guaranteed to recompute a new value, they may return the last sampled value
+ *
* @param descriptor the descriptor of the statistic to update
- * @param supplier a callback that will return the value of the stat. This
- * replaces any previously registered supplier. If the passed in supplier is null, it
- * will remove any existing supplier
- * @return the previously registered supplier, or null if there was no previously registered supplier
- * @throws IllegalArgumentException
- * If no statistic exists with the given <code>descriptor</code> or
- * if the described statistic is not of
- * type <code>double</code>.
+ * @param supplier a callback that will return the value of the stat. This replaces any previously
+ * registered supplier. If the passed in supplier is null, it will remove any existing
+ * supplier
+ * @return the previously registered supplier, or null if there was no previously registered
+ * supplier
+ * @throws IllegalArgumentException If no statistic exists with the given <code>descriptor</code>
+ * or if the described statistic is not of type <code>double</code>.
* @since Geode 1.0
*/
public DoubleSupplier setDoubleSupplier(StatisticDescriptor descriptor, DoubleSupplier supplier);