http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystem.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystem.java b/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystem.java index 982c4f1..cd4dc7e 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystem.java +++ b/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystem.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; @@ -28,87 +26,81 @@ import java.util.Set; import java.util.UUID; /** - * Administrative interface for managing an entire GemFire distributed - * system. This interface should not be confused with {@link - * org.apache.geode.distributed.DistributedSystem - * DistributedSystem} that represents a connection to a GemFire - * distributed system. + * Administrative interface for managing an entire GemFire distributed system. This interface should + * not be confused with {@link org.apache.geode.distributed.DistributedSystem DistributedSystem} + * that represents a connection to a GemFire distributed system. * * @see AdminDistributedSystemFactory * - * @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 + * @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 */ public interface AdminDistributedSystem { - + /** * Retrieves the unique id for this system. */ public String getId(); - + /** - * Retrieves display friendly name for this system. If this administrative - * VM defined an optional name for its connection to the distributed system, - * that name will be returned. Otherwise the returned value will be {@link - * org.apache.geode.admin.AdminDistributedSystem#getId}. + * Retrieves display friendly name for this system. If this administrative VM defined an optional + * name for its connection to the distributed system, that name will be returned. Otherwise the + * returned value will be {@link org.apache.geode.admin.AdminDistributedSystem#getId}. */ public String getName(); - + /** - * Retrieves the remote command and formatting this system should use to - * access and/or manipulate resources on remote machines. + * Retrieves the remote command and formatting this system should use to access and/or manipulate + * resources on remote machines. */ public String getRemoteCommand(); /** - * Sets the remote command and formatting this system should use to access - * and/or manipulate resources on remote machines. + * Sets the remote command and formatting this system should use to access and/or manipulate + * resources on remote machines. */ public void setRemoteCommand(String remoteCommand); /** - * Sets the lowest level of alert that should be delivered to the - * {@link AlertListener}s registered on this - * <code>AdminDistributedSystem</code>. The default level is {@link - * AlertLevel#WARNING}. + * Sets the lowest level of alert that should be delivered to the {@link AlertListener}s + * registered on this <code>AdminDistributedSystem</code>. The default level is + * {@link AlertLevel#WARNING}. */ public void setAlertLevel(AlertLevel level); /** - * Returns the lowest level of alerts that should be delivered to - * the {@link AlertListener}s registered on this - * <code>AdminDistributedSystem</code>. + * Returns the lowest level of alerts that should be delivered to the {@link AlertListener}s + * registered on this <code>AdminDistributedSystem</code>. * * @see #setAlertLevel */ public AlertLevel getAlertLevel(); - + /** - * Sets the lowest level of alert that should be delivered to the - * {@link AlertListener}s registered on this - * <code>AdminDistributedSystem</code>. The default level is {@link - * AlertLevel#WARNING}. + * Sets the lowest level of alert that should be delivered to the {@link AlertListener}s + * registered on this <code>AdminDistributedSystem</code>. The default level is + * {@link AlertLevel#WARNING}. */ public void setAlertLevelAsString(String level); /** - * Returns the lowest level of alerts that should be delivered to - * the {@link AlertListener}s registered on this - * <code>AdminDistributedSystem</code>. + * Returns the lowest level of alerts that should be delivered to the {@link AlertListener}s + * registered on this <code>AdminDistributedSystem</code>. * * @see #setAlertLevelAsString */ public String getAlertLevelAsString(); /** - * Registers an <code>AlertListener</code> that will receive all - * alerts that are at or above the {@linkplain #setAlertLevel alert - * level}. + * Registers an <code>AlertListener</code> that will receive all alerts that are at or above the + * {@linkplain #setAlertLevel alert level}. */ public void addAlertListener(AlertListener listener); /** - * Unregisters an <code>AlertListener</code> + * Unregisters an <code>AlertListener</code> */ public void removeAlertListener(AlertListener listener); @@ -123,42 +115,37 @@ public interface AdminDistributedSystem { public int getMcastPort(); /** - * Retrieves comma-delimited list locators to be used if multi-cast port is - * zero. Format of each locators must be host[port]. + * Retrieves comma-delimited list locators to be used if multi-cast port is zero. Format of each + * locators must be host[port]. */ public String getLocators(); - /** + /** * Returns true if this system has enabled the use of multicast for communications */ public boolean isMcastEnabled(); - + /** * Returns true if any members of this system are currently running. */ public boolean isRunning(); - /** - * Returns <code>true</code> if this is currently connected to the - * system. + /** + * Returns <code>true</code> if this is currently connected to the system. */ public boolean isConnected(); - + /** * Starts all managed entities that are not currently running. * - * @throws AdminException - * If a problem is encountered while starting the managed - * entities. + * @throws AdminException If a problem is encountered while starting the managed entities. */ public void start() throws AdminException; /** * Stops all managed entities that are currently running. * - * @throws AdminException - * If a problem is encountered while starting the managed - * entities. + * @throws AdminException If a problem is encountered while starting the managed entities. */ public void stop() throws AdminException; @@ -176,50 +163,44 @@ public interface AdminDistributedSystem { /** * Creates a new <code>DistributionLocator</code> that is ready to - * {@linkplain DistributionLocator#getConfig configure} and - * {@linkplain #start start}. + * {@linkplain DistributionLocator#getConfig configure} and {@linkplain #start start}. * * <P> * - * It is presumed that the newly-added locator is used to discover - * members of the distributed system. That is, the host/port of the - * new locator is appended to the {@link #getLocators locators} - * attribute of this <code>AdminDistributedSystem</code>. + * It is presumed that the newly-added locator is used to discover members of the distributed + * system. That is, the host/port of the new locator is appended to the {@link #getLocators + * locators} attribute of this <code>AdminDistributedSystem</code>. */ public DistributionLocator addDistributionLocator(); - - /** - * Returns array of <code>DistributionLocator</code>s administered - * by this <code>AdminDistributedSystem</code>. - */ + + /** + * Returns array of <code>DistributionLocator</code>s administered by this + * <code>AdminDistributedSystem</code>. + */ public DistributionLocator[] getDistributionLocators(); - + /** - * Retrieves SystemMember instances for every - * application that is running and currently connection to this - * system. Note that this list does not include dedicated - * {@linkplain #getCacheVms cache server vms}. + * Retrieves SystemMember instances for every application that is running and currently connection + * to this system. Note that this list does not include dedicated {@linkplain #getCacheVms cache + * server vms}. */ - public SystemMember[] getSystemMemberApplications() - throws org.apache.geode.admin.AdminException; + public SystemMember[] getSystemMemberApplications() throws org.apache.geode.admin.AdminException; /** * Display in readable format the latest Alert in this distributed system. */ public String getLatestAlert(); - + /** * Returns an object for monitoring the health of GemFire. */ public GemFireHealth getGemFireHealth(); /** - * Connects to the distributed system. This method will return - * immediately after spawning a background thread that connects to - * the distributed system. As a result, a - * <code>AdminDistributedSystem</code> can be "connected" to before - * any members of the system have been started or have been seen. - * The {@link #waitToBeConnected} method will wait for the + * Connects to the distributed system. This method will return immediately after spawning a + * background thread that connects to the distributed system. As a result, a + * <code>AdminDistributedSystem</code> can be "connected" to before any members of the system have + * been started or have been seen. The {@link #waitToBeConnected} method will wait for the * connection to be made. * * @see #isConnected @@ -229,36 +210,29 @@ public interface AdminDistributedSystem { public void connect(); /** - * Wait for up to a given number of milliseconds for the connection - * to the distributed system to be made. + * Wait for up to a given number of milliseconds for the connection to the distributed system to + * be made. * - * @param timeout - * The number of milliseconds to wait for the connection to - * to be made. + * @param timeout The number of milliseconds to wait for the connection to to be made. * - * @return Whether or not the connection was made. - * <code>false</code>, if the method times out + * @return Whether or not the connection was made. <code>false</code>, if the method times out * - * @throws InterruptedException - * If the thread invoking this method is interrupted while - * waiting. - * @throws IllegalStateException - * If {@link #connect} has not yet been called. + * @throws InterruptedException If the thread invoking this method is interrupted while waiting. + * @throws IllegalStateException If {@link #connect} has not yet been called. */ - public boolean waitToBeConnected(long timeout) - throws InterruptedException; + public boolean waitToBeConnected(long timeout) throws InterruptedException; /** * Disconnects from the distributed system. */ public void disconnect(); - /** Returns this system's configuration .*/ + /** Returns this system's configuration . */ public DistributedSystemConfig getConfig(); - + /** - * Registers a listener that receives callbacks when a member joins - * or leaves the distributed system. + * Registers a listener that receives callbacks when a member joins or leaves the distributed + * system. */ public void addMembershipListener(SystemMembershipListener listener); @@ -270,26 +244,25 @@ public interface AdminDistributedSystem { public void removeMembershipListener(SystemMembershipListener listener); /** - * Registers a cache event listener. - * Does nothing if the listener is already registered. The listeners are called - * in the order they are registered. + * Registers a cache event listener. Does nothing if the listener is already registered. The + * listeners are called in the order they are registered. + * * @param listener the listener to register. - * @since GemFire 5.0 + * @since GemFire 5.0 */ - public void addCacheListener(SystemMemberCacheListener listener); + public void addCacheListener(SystemMemberCacheListener listener); - /** - * Unregisters a cache listener. Does nothing if the listener is - * not registered. - * @param listener the listener to unregister. - * @since GemFire 5.0 - */ - public void removeCacheListener(SystemMemberCacheListener listener); + /** + * Unregisters a cache listener. Does nothing if the listener is not registered. + * + * @param listener the listener to unregister. + * @since GemFire 5.0 + */ + public void removeCacheListener(SystemMemberCacheListener listener); /** - * Creates a new cache server that is ready to {@linkplain - * CacheServerConfig configure} and {@linkplain #start - * start}. + * Creates a new cache server that is ready to {@linkplain CacheServerConfig configure} and + * {@linkplain #start start}. * * @since GemFire 4.0 * @deprecated as of 5.7 use {@link #addCacheVm} instead. @@ -298,10 +271,8 @@ public interface AdminDistributedSystem { public CacheServer addCacheServer() throws AdminException; /** - * Returns all of the dedicated cache server members of the - * distributed system. Because they are not managed entities, - * application VMs that host a server cache are not included in the - * array. + * Returns all of the dedicated cache server members of the distributed system. Because they are + * not managed entities, application VMs that host a server cache are not included in the array. * * @since GemFire 4.0 * @deprecated as of 5.7 use {@link #getCacheVms} instead. @@ -310,33 +281,28 @@ public interface AdminDistributedSystem { public CacheServer[] getCacheServers() throws AdminException; /** - * Returns all the cache server members of the distributed system which are - * hosting a client queue for the particular durable-client having the given - * durableClientId + * Returns all the cache server members of the distributed system which are hosting a client queue + * for the particular durable-client having the given durableClientId * - * @param durableClientId - - * durable-id of the client + * @param durableClientId - durable-id of the client * @return array of CacheServer(s) having the queue for the durable client * @throws AdminException * * @since GemFire 5.6 */ - public CacheServer[] getCacheServers(String durableClientId) - throws AdminException; + public CacheServer[] getCacheServers(String durableClientId) throws AdminException; /** - * Creates a new cache vm that is ready to {@linkplain - * CacheVmConfig configure} and {@linkplain #start - * start}. + * Creates a new cache vm that is ready to {@linkplain CacheVmConfig configure} and + * {@linkplain #start start}. * * @since GemFire 5.7 */ public CacheVm addCacheVm() throws AdminException; /** - * Returns all of the dedicated cache server vm members of the - * distributed system. Because they are not managed entities, - * application VMs that host a server cache are not included in the + * Returns all of the dedicated cache server vm members of the distributed system. Because they + * are not managed entities, application VMs that host a server cache are not included in the * array. * * @since GemFire 5.7 @@ -344,52 +310,47 @@ public interface AdminDistributedSystem { public CacheVm[] getCacheVms() throws AdminException; /** - * Returns the administrative SystemMember specified by the {@link - * org.apache.geode.distributed.DistributedMember}. + * Returns the administrative SystemMember specified by the + * {@link org.apache.geode.distributed.DistributedMember}. * * @param distributedMember the distributed member to lookup * @return administrative SystemMember for that distributed member * @since GemFire 5.0 */ - public SystemMember lookupSystemMember(DistributedMember distributedMember) - throws AdminException; + public SystemMember lookupSystemMember(DistributedMember distributedMember) throws AdminException; /** - * Indicate to the distributed system that persistent files have been lost. - * When a member recovers from a set of persistent files, it will wait for - * other members that were also persisting the same region to start up. If the - * persistent files for those other members were lost, this method can be used - * to tell the remaining members to stop waiting for the lost data. + * Indicate to the distributed system that persistent files have been lost. When a member recovers + * from a set of persistent files, it will wait for other members that were also persisting the + * same region to start up. If the persistent files for those other members were lost, this method + * can be used to tell the remaining members to stop waiting for the lost data. * - * @param host - * The host of the member whose files were lost. - * @param directory - * The directory where those files resided. + * @param host The host of the member whose files were lost. + * @param directory The directory where those files resided. * @since GemFire 6.5 * @deprecated use {@link #revokePersistentMember(UUID)} instead */ public void revokePersistentMember(InetAddress host, String directory) throws AdminException; - + /** - * Indicate to the distributed system that persistent files have been lost. - * When a member recovers from a set of persistent files, it will wait for - * other members that were also persisting the same region to start up. If the - * persistent files for those other members were lost, this method can be used - * to tell the remaining members to stop waiting for the lost data. + * Indicate to the distributed system that persistent files have been lost. When a member recovers + * from a set of persistent files, it will wait for other members that were also persisting the + * same region to start up. If the persistent files for those other members were lost, this method + * can be used to tell the remaining members to stop waiting for the lost data. * - * @param diskStoreID - * The unique id of the disk store which you are revoking. The unique - * id can be discovered from {@link #getMissingPersistentMembers()} + * @param diskStoreID The unique id of the disk store which you are revoking. The unique id can be + * discovered from {@link #getMissingPersistentMembers()} * * @since GemFire 7.0 */ public void revokePersistentMember(UUID diskStoreID) throws AdminException; - + /** - * Retrieve the set of persistent files that the existing members are waiting - * for. See {@link AdminDistributedSystem#revokePersistentMember(InetAddress, String)} - * @return The persistent members that were known to the existing persistent members, - * when the existing members were last online. + * Retrieve the set of persistent files that the existing members are waiting for. See + * {@link AdminDistributedSystem#revokePersistentMember(InetAddress, String)} + * + * @return The persistent members that were known to the existing persistent members, when the + * existing members were last online. * @throws AdminException * @since GemFire 6.5 * @@ -397,36 +358,33 @@ public interface AdminDistributedSystem { public Set<PersistentID> getMissingPersistentMembers() throws AdminException; /** - * Shuts down all the members of the distributed system with a cache that the admin - * member is connected to, excluding the stand-alone locators. Calling this method - * will ensure that regions with the {@link DataPolicy#PERSISTENT_PARTITION} to - * be shutdown in a way which allows for a faster recovery when the members are - * restarted. + * Shuts down all the members of the distributed system with a cache that the admin member is + * connected to, excluding the stand-alone locators. Calling this method will ensure that regions + * with the {@link DataPolicy#PERSISTENT_PARTITION} to be shutdown in a way which allows for a + * faster recovery when the members are restarted. + * + * Killing individual members can lead to inconsistencies in the members persistent data, which + * gemfire repairs on startup. Calling shutDownAllMembers makes sure that the persistent files are + * consistent on shutdown, which makes recovery faster. * - * Killing individual members can lead to inconsistencies in the members persistent - * data, which gemfire repairs on startup. Calling shutDownAllMembers makes sure - * that the persistent files are consistent on shutdown, which makes recovery faster. - * * This is equivalent to calling shutDownAllMembers(0); + * * @return The set of members that were shutdown * @since GemFire 6.5 */ public Set<DistributedMember> shutDownAllMembers() throws AdminException; - + /** - * Shuts down all the members of the distributed system with a cache that the - * admin member is connected to, excluding the stand-alone locators. Calling - * this method will ensure that regions with the - * {@link DataPolicy#PERSISTENT_PARTITION} to be shutdown in a way which - * allows for a faster recovery when the members are restarted. + * Shuts down all the members of the distributed system with a cache that the admin member is + * connected to, excluding the stand-alone locators. Calling this method will ensure that regions + * with the {@link DataPolicy#PERSISTENT_PARTITION} to be shutdown in a way which allows for a + * faster recovery when the members are restarted. * - * Killing individual members can lead to inconsistencies in the members - * persistent data, which gemfire repairs on startup. Calling - * shutDownAllMembers makes sure that the persistent files are consistent on - * shutdown, which makes recovery faster. + * Killing individual members can lead to inconsistencies in the members persistent data, which + * gemfire repairs on startup. Calling shutDownAllMembers makes sure that the persistent files are + * consistent on shutdown, which makes recovery faster. * - * @param timeout The amount of time to wait (in milliseconds) for the shutdown all to - * complete. + * @param timeout The amount of time to wait (in milliseconds) for the shutdown all to complete. * @return The set of members that were shutdown, or null if the timeout is exceeded. * * @since GemFire 6.5 @@ -434,38 +392,37 @@ public interface AdminDistributedSystem { public Set<DistributedMember> shutDownAllMembers(long timeout) throws AdminException; /** - * Backup the persistent files for all of the members of the distributed - * system that the admin member is connected to. + * Backup the persistent files for all of the members of the distributed system that the admin + * member is connected to. * * @param targetDir The directory where each member's backup should be placed. * - * @return The status of the backup, which includes the set of members - * that were backed up and the set of members that were known to be - * offline at the time of backup. + * @return The status of the backup, which includes the set of members that were backed up and the + * set of members that were known to be offline at the time of backup. * @since GemFire 6.5 */ public BackupStatus backupAllMembers(File targetDir) throws AdminException; - + /** - * Incrementally backup the persistent files for all of the members of the distributed - * system that the admin member is connected to. Only new operation log files since the previous backup will be copied during this backup. - * The generated restore script will reference and copy operation log files from the previous backup. + * Incrementally backup the persistent files for all of the members of the distributed system that + * the admin member is connected to. Only new operation log files since the previous backup will + * be copied during this backup. The generated restore script will reference and copy operation + * log files from the previous backup. * * @param targetDir The directory where each member's backup should be placed. - * @param baselineDir The directory of a previous backup. - * If this parameter is null or the directory does not exist (on a member by member basis) - * a full backup will be performed for the member. + * @param baselineDir The directory of a previous backup. If this parameter is null or the + * directory does not exist (on a member by member basis) a full backup will be performed + * for the member. * - * @return The status of the backup, which includes the set of members - * that were backed up and the set of members that were known to be - * offline at the time of backup. + * @return The status of the backup, which includes the set of members that were backed up and the + * set of members that were known to be offline at the time of backup. * @since GemFire 6.5 */ - public BackupStatus backupAllMembers(File targetDir,File baselineDir) throws AdminException; - + public BackupStatus backupAllMembers(File targetDir, File baselineDir) throws AdminException; + /** - * Compact the persistent files for all of the members of the distributed - * system that the admin member connected to. + * Compact the persistent files for all of the members of the distributed system that the admin + * member connected to. * * This is equivalent to calling {DiskStore#forceCompaction} on all members. *
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystemFactory.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystemFactory.java b/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystemFactory.java index 6f2af1f..60a8722 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystemFactory.java +++ b/geode-core/src/main/java/org/apache/geode/admin/AdminDistributedSystemFactory.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; @@ -29,25 +27,25 @@ import org.apache.geode.internal.logging.LocalLogWriter; import java.util.Properties; /** - * Factory for creating GemFire administration entities. + * Factory for creating GemFire administration entities. * - * @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 + * @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 */ public class AdminDistributedSystemFactory { - + /** - * Sets the address this VM should bind to when connecting to the distributed - * system. This involves a system property, so using this option will limit - * all connections to distributed systems to this one network interface. + * Sets the address this VM should bind to when connecting to the distributed system. This + * involves a system property, so using this option will limit all connections to distributed + * systems to this one network interface. * <p> - * Using a null or empty bindAddress will clear the usage of this option and - * connections to distributed systems will return to using all available - * network interfaces. + * Using a null or empty bindAddress will clear the usage of this option and connections to + * distributed systems will return to using all available network interfaces. * <p> - * This method always throws UnsupportedOperationException because it is - * now deprecated and is unsafe to use. Please use {@link - * DistributedSystemConfig#setBindAddress} instead. + * This method always throws UnsupportedOperationException because it is now deprecated and is + * unsafe to use. Please use {@link DistributedSystemConfig#setBindAddress} instead. * * @param bindAddress machine name or IP address to bind to * @throws UnsupportedOperationException because of deprecation @@ -55,101 +53,90 @@ public class AdminDistributedSystemFactory { */ @Deprecated public static void bindToAddress(String bindAddress) { - throw new UnsupportedOperationException(LocalizedStrings.AdminDistributedSystemFactory_PLEASE_USE_DISTRIBUTEDSYSTEMCONFIGSETBINDADDRESS_INSTEAD.toLocalizedString()); + throw new UnsupportedOperationException( + LocalizedStrings.AdminDistributedSystemFactory_PLEASE_USE_DISTRIBUTEDSYSTEMCONFIGSETBINDADDRESS_INSTEAD + .toLocalizedString()); } - + /** - * Defines a "default" distributed system configuration based on VM - * system properties and the content of - * <code>gemfire.properties</code>. The {@linkplain - * DistributedSystemConfig#DEFAULT_REMOTE_COMMAND} default remote - * command is used. + * Defines a "default" distributed system configuration based on VM system properties and the + * content of <code>gemfire.properties</code>. The + * {@linkplain DistributedSystemConfig#DEFAULT_REMOTE_COMMAND} default remote command is used. * * @see DistributedSystem#connect */ public static DistributedSystemConfig defineDistributedSystem() { DistributionConfig dc = new DistributionConfigImpl(new Properties()); - String remoteCommand = - DistributedSystemConfig.DEFAULT_REMOTE_COMMAND; + String remoteCommand = DistributedSystemConfig.DEFAULT_REMOTE_COMMAND; return new DistributedSystemConfigImpl(dc, remoteCommand); } /** - * Call this method with a value of <code>true</code> - * to dedicate the VM to GemFire administration only. - * Default is <code>false</code>. - * <p>This method <em>must</em> be called before calling - * {@link AdminDistributedSystem#connect}. It <em>must</em> also be called - * before {@link DistributedSystem#connect} is when creating a colocated distributed system. + * Call this method with a value of <code>true</code> to dedicate the VM to GemFire administration + * only. Default is <code>false</code>. + * <p> + * This method <em>must</em> be called before calling {@link AdminDistributedSystem#connect}. It + * <em>must</em> also be called before {@link DistributedSystem#connect} is when creating a + * colocated distributed system. * <p> * Once it has been enabled be careful to only use GemFire APIs from the - * <code>org.apache.geode.admin</code> package. In particular do not create - * a {@link org.apache.geode.cache.Cache} or a normal {@link DistributedSystem}. + * <code>org.apache.geode.admin</code> package. In particular do not create a + * {@link org.apache.geode.cache.Cache} or a normal {@link DistributedSystem}. + * * @param adminOnly <code>true</code> if this VM should be limited to administration APIs; - * <code>false</code> if this VM should allow all GemFire APIs. - * @throws IllegalStateException if a {@link DistributedSystem} - * or {@link AdminDistributedSystem} connection already exists. + * <code>false</code> if this VM should allow all GemFire APIs. + * @throws IllegalStateException if a {@link DistributedSystem} or {@link AdminDistributedSystem} + * connection already exists. * * @since GemFire 5.7 */ public static void setEnableAdministrationOnly(boolean adminOnly) { InternalDistributedSystem.setEnableAdministrationOnly(adminOnly); } - + /** - * Defines a distributed system configuration for administering the - * distributed system to which this VM is currently connected. The - * <code>DistributedSystem</code> is used to configure the discovery - * mechanism (multicast or locators), bind address, SSL attributes, - * as well as the logger of the - * <code>DistributedSystemConfig</code>. Note that the distributed - * system will not be able to be administered until the {@link - * AdminDistributedSystem#connect connect} method is invoked. + * Defines a distributed system configuration for administering the distributed system to which + * this VM is currently connected. The <code>DistributedSystem</code> is used to configure the + * discovery mechanism (multicast or locators), bind address, SSL attributes, as well as the + * logger of the <code>DistributedSystemConfig</code>. Note that the distributed system will not + * be able to be administered until the {@link AdminDistributedSystem#connect connect} method is + * invoked. * - * @param system - * A connection to the distributed system - * @param remoteCommand - * The shell command that is used to launch processes that - * run on remote machines. If <code>null</code>, then the - * {@linkplain DistributedSystemConfig#DEFAULT_REMOTE_COMMAND - * default} will be used. + * @param system A connection to the distributed system + * @param remoteCommand The shell command that is used to launch processes that run on remote + * machines. If <code>null</code>, then the + * {@linkplain DistributedSystemConfig#DEFAULT_REMOTE_COMMAND default} will be used. * * @since GemFire 4.0 */ - public static DistributedSystemConfig - defineDistributedSystem(DistributedSystem system, - String remoteCommand) - throws AdminException { + public static DistributedSystemConfig defineDistributedSystem(DistributedSystem system, + String remoteCommand) throws AdminException { - InternalDistributedSystem internal = - (InternalDistributedSystem) system; + InternalDistributedSystem internal = (InternalDistributedSystem) system; if (remoteCommand == null) { remoteCommand = DistributedSystemConfig.DEFAULT_REMOTE_COMMAND; } - + DistributedSystemConfigImpl impl = - new DistributedSystemConfigImpl(internal.getConfig(), - remoteCommand); + new DistributedSystemConfigImpl(internal.getConfig(), remoteCommand); return impl; } /** - * Returns the distributed system for administrative monitoring and - * managing. You must then call {@link - * AdminDistributedSystem#connect} before interacting with the - * actual system. + * Returns the distributed system for administrative monitoring and managing. You must then call + * {@link AdminDistributedSystem#connect} before interacting with the actual system. * * @param config configuration definition of the system to administer * @return administrative interface for a distributed system */ public static AdminDistributedSystem getDistributedSystem(DistributedSystemConfig config) { - return new AdminDistributedSystemImpl((DistributedSystemConfigImpl)config); + return new AdminDistributedSystemImpl((DistributedSystemConfigImpl) config); } - + /** - * Returns a default GemFire LogWriterI18n for logging. This LogWriterI18n will - * log to standard out. + * Returns a default GemFire LogWriterI18n for logging. This LogWriterI18n will log to standard + * out. * * @return a GemFire LogWriterI18n for logging */ http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/AdminException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/AdminException.java b/geode-core/src/main/java/org/apache/geode/admin/AdminException.java index e7d574d..92b5e47 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/AdminException.java +++ b/geode-core/src/main/java/org/apache/geode/admin/AdminException.java @@ -1,89 +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; import org.apache.geode.GemFireCheckedException; /** - * An <code>AdminException</code> is thrown when administration or monitoring - * of GemFire fails. + * An <code>AdminException</code> is thrown when administration or monitoring of GemFire fails. * - * @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 AdminException extends GemFireCheckedException { -private static final long serialVersionUID = 879398950879472021L; + private static final long serialVersionUID = 879398950879472021L; /** - * 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 AdminException() { 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 AdminException(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 AdminException(String message, Throwable cause) { super(message, cause); } /** - * Constructs a new exception with the specified cause. - * The detail - * message will be <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. The detail message will be + * <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 AdminException(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/AdminXmlException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/AdminXmlException.java b/geode-core/src/main/java/org/apache/geode/admin/AdminXmlException.java index e465ddc..ff1b48e 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/AdminXmlException.java +++ b/geode-core/src/main/java/org/apache/geode/admin/AdminXmlException.java @@ -1,44 +1,41 @@ /* - * 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; /** - * Thrown when a problem is encountered while working with - * admin-related XML data. + * Thrown when a problem is encountered while working with admin-related XML data. * * @see DistributedSystemConfig#getEntityConfigXMLFile * * @since GemFire 4.0 - * @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 AdminXmlException extends RuntimeAdminException { private static final long serialVersionUID = -6848726449157550169L; /** - * Creates a new <code>AdminXmlException</code> with the given - * descriptive message. + * Creates a new <code>AdminXmlException</code> with the given descriptive message. */ public AdminXmlException(String s) { super(s); } /** - * Creates a new <code>AdminXmlException</code> with the given - * descriptive message and cause. + * Creates a new <code>AdminXmlException</code> with the given descriptive message and cause. */ public AdminXmlException(String s, Throwable cause) { super(s, cause); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/Alert.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/Alert.java b/geode-core/src/main/java/org/apache/geode/admin/Alert.java index 9519cba..44c373e 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/Alert.java +++ b/geode-core/src/main/java/org/apache/geode/admin/Alert.java @@ -1,45 +1,43 @@ /* - * 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 administration alert that is issued by a member of a GemFire - * distributed system. It is similar to a {@linkplain - * org.apache.geode.i18n.LogWriterI18n log message}. + * An administration alert that is issued by a member of a GemFire distributed system. It is similar + * to a {@linkplain org.apache.geode.i18n.LogWriterI18n log message}. * - * @see AlertListener - * @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 + * @see AlertListener + * @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 */ public interface Alert { - + /** The level at which this alert is issued */ public AlertLevel getLevel(); /** - * The member of the distributed system that issued the alert, or - * null if the issuer is no longer a member of the distributed system. + * The member of the distributed system that issued the alert, or null if the issuer is no longer + * a member of the distributed system. */ public SystemMember getSystemMember(); - /** - * The name of the {@linkplain - * org.apache.geode.distributed.DistributedSystem#getName - * distributed system}) through which the alert was issued. + /** + * The name of the {@linkplain org.apache.geode.distributed.DistributedSystem#getName distributed + * system}) through which the alert was issued. */ public String getConnectionName(); http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/AlertLevel.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/AlertLevel.java b/geode-core/src/main/java/org/apache/geode/admin/AlertLevel.java index 0791a5f..2fdcef8 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/AlertLevel.java +++ b/geode-core/src/main/java/org/apache/geode/admin/AlertLevel.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; @@ -20,50 +18,46 @@ import org.apache.geode.internal.admin.Alert; import org.apache.geode.internal.i18n.LocalizedStrings; /** - * Type-safe enumeration for {@link org.apache.geode.admin.Alert - * Alert} level. + * Type-safe enumeration for {@link org.apache.geode.admin.Alert Alert} level. * - * @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 + * @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 */ public class AlertLevel implements java.io.Serializable { private static final long serialVersionUID = -4752438966587392126L; - - public static final AlertLevel WARNING = - new AlertLevel(Alert.WARNING, "WARNING"); - public static final AlertLevel ERROR = - new AlertLevel(Alert.ERROR, "ERROR"); - public static final AlertLevel SEVERE = - new AlertLevel(Alert.SEVERE, "SEVERE"); - - public static final AlertLevel OFF = - new AlertLevel(Alert.OFF, "OFF"); + + public static final AlertLevel WARNING = new AlertLevel(Alert.WARNING, "WARNING"); + public static final AlertLevel ERROR = new AlertLevel(Alert.ERROR, "ERROR"); + public static final AlertLevel SEVERE = new AlertLevel(Alert.SEVERE, "SEVERE"); + + public static final AlertLevel OFF = new AlertLevel(Alert.OFF, "OFF"); /** The severity level of this AlertLevel. Greater is more severe. */ private final transient int severity; - + /** The name of this AlertLevel. */ private final transient String name; - + // The 4 declarations below are necessary for serialization /** int used as ordinal to represent this AlertLevel */ public final int ordinal = nextOrdinal++; private static int nextOrdinal = 0; - - private static final AlertLevel[] VALUES = - { WARNING, ERROR, SEVERE, OFF }; + + private static final AlertLevel[] VALUES = {WARNING, ERROR, SEVERE, OFF}; private Object readResolve() throws java.io.ObjectStreamException { - return VALUES[ordinal]; // Canonicalize + return VALUES[ordinal]; // Canonicalize } - + /** Creates a new instance of AlertLevel. */ private AlertLevel(int severity, String name) { this.severity = severity; this.name = name; } - + /** Return the AlertLevel represented by specified ordinal */ public static AlertLevel fromOrdinal(int ordinal) { return VALUES[ordinal]; @@ -72,30 +66,29 @@ public class AlertLevel implements java.io.Serializable { /** * Returns the <code>AlertLevel</code> for the given severity * - * @throws IllegalArgumentException - * If there is no alert level with the given - * <code>severity</code> + * @throws IllegalArgumentException If there is no alert level with the given + * <code>severity</code> */ public static AlertLevel forSeverity(int severity) { switch (severity) { - case Alert.WARNING: - return AlertLevel.WARNING; - case Alert.ERROR: - return AlertLevel.ERROR; - case Alert.SEVERE: - return AlertLevel.SEVERE; - case Alert.OFF: - return AlertLevel.OFF; - default: - throw new IllegalArgumentException(LocalizedStrings.AlertLevel_UNKNOWN_ALERT_SEVERITY_0.toLocalizedString(Integer.valueOf(severity))); + case Alert.WARNING: + return AlertLevel.WARNING; + case Alert.ERROR: + return AlertLevel.ERROR; + case Alert.SEVERE: + return AlertLevel.SEVERE; + case Alert.OFF: + return AlertLevel.OFF; + default: + throw new IllegalArgumentException(LocalizedStrings.AlertLevel_UNKNOWN_ALERT_SEVERITY_0 + .toLocalizedString(Integer.valueOf(severity))); } } /** * Returns the <code>AlertLevel</code> with the given name * - * @throws IllegalArgumentException - * If there is no alert level named <code>name</code> + * @throws IllegalArgumentException If there is no alert level named <code>name</code> */ public static AlertLevel forName(String name) { for (int i = 0; i < VALUES.length; i++) { @@ -105,13 +98,14 @@ public class AlertLevel implements java.io.Serializable { } } - throw new IllegalArgumentException(LocalizedStrings.AlertLevel_THERE_IS_NO_ALERT_LEVEL_0.toLocalizedString(name)); + throw new IllegalArgumentException( + LocalizedStrings.AlertLevel_THERE_IS_NO_ALERT_LEVEL_0.toLocalizedString(name)); } public int getSeverity() { return this.severity; } - + public String getName() { return this.name; } @@ -119,8 +113,8 @@ public class AlertLevel implements java.io.Serializable { public static AlertLevel[] values() { return VALUES; } - - /** + + /** * Returns a string representation for this alert level. * * @return the name of this alert level @@ -130,43 +124,45 @@ public class AlertLevel implements java.io.Serializable { return this.name /* + "=" + this.severity */; } - /** - * Indicates whether some other object is "equal to" this one. - * - * @param other the reference object with which to compare. - * @return true if this object is the same as the obj argument; - * false otherwise. - */ + /** + * Indicates whether some other object is "equal to" this one. + * + * @param other the reference object with which to compare. + * @return true if this object is the same as the obj argument; false otherwise. + */ @Override - public boolean equals(Object other) { - if (other == this) return true; - if (other == null) return false; - if (!(other instanceof AlertLevel)) return false; - final AlertLevel that = (AlertLevel) other; - - if (this.severity != that.severity) return false; - if (this.name != null && - !this.name.equals(that.name)) return false; - - return true; - } - - /** - * Returns a hash code for the object. This method is supported for the - * benefit of hashtables such as those provided by java.util.Hashtable. - * - * @return the integer 0 if description is null; otherwise a unique integer. - */ + public boolean equals(Object other) { + if (other == this) + return true; + if (other == null) + return false; + if (!(other instanceof AlertLevel)) + return false; + final AlertLevel that = (AlertLevel) other; + + if (this.severity != that.severity) + return false; + if (this.name != null && !this.name.equals(that.name)) + return false; + + return true; + } + + /** + * Returns a hash code for the object. This method is supported for the benefit of hashtables such + * as those provided by java.util.Hashtable. + * + * @return the integer 0 if description is null; otherwise a unique integer. + */ @Override - public int hashCode() { - int result = 17; - final int mult = 37; + public int hashCode() { + int result = 17; + final int mult = 37; - result = mult * result + this.severity; - result = mult * result + - (this.name == null ? 0 : this.name.hashCode()); + result = mult * result + this.severity; + result = mult * result + (this.name == null ? 0 : this.name.hashCode()); - return result; - } + return result; + } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/AlertListener.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/AlertListener.java b/geode-core/src/main/java/org/apache/geode/admin/AlertListener.java index f217817..247f4d0 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/AlertListener.java +++ b/geode-core/src/main/java/org/apache/geode/admin/AlertListener.java @@ -1,25 +1,25 @@ /* - * 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 an {@link Alert} - * is received. - * @deprecated as of 7.0 use the <code><a href="{@docRoot}/org/apache/geode/management/package-summary.html">management</a></code> package instead + * A listener whose callback methods are invoked when an {@link Alert} is received. + * + * @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 AlertListener extends java.util.EventListener { http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/BackupStatus.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/BackupStatus.java b/geode-core/src/main/java/org/apache/geode/admin/BackupStatus.java index 802d37e..c696b07 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/BackupStatus.java +++ b/geode-core/src/main/java/org/apache/geode/admin/BackupStatus.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; @@ -27,22 +25,22 @@ import org.apache.geode.distributed.DistributedMember; * {@link AdminDistributedSystem#backupAllMembers(java.io.File,java.io.File)}. * * @since GemFire 6.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 BackupStatus { - + /** - * Returns a map of disk stores that were successfully backed up. - * The key is an online distributed member. The value is the set of disk - * stores on that distributed member. + * Returns a map of disk stores that were successfully backed up. The key is an online distributed + * member. The value is the set of disk stores on that distributed member. */ Map<DistributedMember, Set<PersistentID>> getBackedUpDiskStores(); - + /** - * Returns the set of disk stores that were known to be offline at the - * time of the backup. These members were not backed up. If this set - * is not empty the backup may not contain a complete snapshot of - * any partitioned regions in the distributed system. + * Returns the set of disk stores that were known to be offline at the time of the backup. These + * members were not backed up. If this set is not empty the backup may not contain a complete + * snapshot of any partitioned regions in the distributed system. */ Set<PersistentID> getOfflineDiskStores(); } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/CacheDoesNotExistException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/CacheDoesNotExistException.java b/geode-core/src/main/java/org/apache/geode/admin/CacheDoesNotExistException.java index ac43c1f..338061e 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/CacheDoesNotExistException.java +++ b/geode-core/src/main/java/org/apache/geode/admin/CacheDoesNotExistException.java @@ -1,86 +1,80 @@ /* - * 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>CacheDoesNotExistException</code> is thrown when an attempt - * is made to get a cache and one does not exist. + * An <code>CacheDoesNotExistException</code> is thrown when an attempt is made to get a cache and + * one does not exist. * - * @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 + * @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 */ public class CacheDoesNotExistException extends AdminException { -private static final long serialVersionUID = -1639933911265729978L; + private static final long serialVersionUID = -1639933911265729978L; /** - * 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 CacheDoesNotExistException() { 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 CacheDoesNotExistException(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 CacheDoesNotExistException(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 CacheDoesNotExistException(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/CacheHealthConfig.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/CacheHealthConfig.java b/geode-core/src/main/java/org/apache/geode/admin/CacheHealthConfig.java index f2aeb6d..9f99309 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/CacheHealthConfig.java +++ b/geode-core/src/main/java/org/apache/geode/admin/CacheHealthConfig.java @@ -1,60 +1,56 @@ /* - * 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; /** - * Provides configuration information relating to the health of a - * member of a GemFire distributed system that hosts a GemFire {@link - * org.apache.geode.cache.Cache Cache}. + * Provides configuration information relating to the health of a member of a GemFire distributed + * system that hosts a GemFire {@link org.apache.geode.cache.Cache Cache}. * * <P> * - * If any of the following criteria is true, then a cache member is - * considered to be in {@link GemFireHealth#OKAY_HEALTH OKAY_HEALTH}. + * If any of the following criteria is true, then a cache member is considered to be in + * {@link GemFireHealth#OKAY_HEALTH OKAY_HEALTH}. * * <UL> * - * <LI><code>netSearch</code> operations take {@linkplain - * #getMaxNetSearchTime too long} to complete.</LI> + * <LI><code>netSearch</code> operations take {@linkplain #getMaxNetSearchTime too long} to + * complete.</LI> * - * <LI>Cache <code>load</code> operations take {@linkplain - * #getMaxLoadTime too long} to complete.</LI> + * <LI>Cache <code>load</code> operations take {@linkplain #getMaxLoadTime too long} to + * complete.</LI> * - * <LI>The overall cache {@link #getMinHitRatio hitRatio} is too - * small</LI> + * <LI>The overall cache {@link #getMinHitRatio hitRatio} is too small</LI> * - * <LI>The number of entries in the Cache {@link #getMaxEventQueueSize - * event delivery queue} is too large.</LI> + * <LI>The number of entries in the Cache {@link #getMaxEventQueueSize event delivery queue} is too + * large.</LI> * - * <LI>If one of the regions is configured with {@link org.apache.geode.cache.LossAction#FULL_ACCESS FULL_ACCESS} - * on role loss.</LI> + * <LI>If one of the regions is configured with {@link org.apache.geode.cache.LossAction#FULL_ACCESS + * FULL_ACCESS} on role loss.</LI> * * </UL> * - * If any of the following criteria is true, then a cache member is - * considered to be in {@link GemFireHealth#POOR_HEALTH POOR_HEALTH}. + * If any of the following criteria is true, then a cache member is considered to be in + * {@link GemFireHealth#POOR_HEALTH POOR_HEALTH}. * * <UL> * - * <LI>If one of the regions is configured with {@link org.apache.geode.cache.LossAction#NO_ACCESS NO_ACCESS} - * on role loss.</LI> + * <LI>If one of the regions is configured with {@link org.apache.geode.cache.LossAction#NO_ACCESS + * NO_ACCESS} on role loss.</LI> * - * <LI>If one of the regions is configured with {@link org.apache.geode.cache.LossAction#LIMITED_ACCESS LIMITED_ACCESS} - * on role loss.</LI> + * <LI>If one of the regions is configured with + * {@link org.apache.geode.cache.LossAction#LIMITED_ACCESS LIMITED_ACCESS} on role loss.</LI> * * </UL> * @@ -64,60 +60,61 @@ package org.apache.geode.admin; * * * @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 CacheHealthConfig { - /** The default maximum number of milliseconds a - * <code>netSearch</code> operation can take before the cache member - * is considered to be unhealthy. */ + /** + * The default maximum number of milliseconds a <code>netSearch</code> operation can take before + * the cache member is considered to be unhealthy. + */ public static final long DEFAULT_MAX_NET_SEARCH_TIME = 60 * 1000; - /** The default maximum mumber of milliseconds a cache - * <code>load</code> operation can take before the cache member is - * considered to be unhealthy. */ + /** + * The default maximum mumber of milliseconds a cache <code>load</code> operation can take before + * the cache member is considered to be unhealthy. + */ public static final long DEFAULT_MAX_LOAD_TIME = 60 * 1000; /** The default minimum hit ratio of a healthy cache member. */ public static final double DEFAULT_MIN_HIT_RATIO = 0.0; - /** The default maximum number of entries in the event delivery queue - * of a healthy cache member. */ + /** + * The default maximum number of entries in the event delivery queue of a healthy cache member. + */ public static final long DEFAULT_MAX_EVENT_QUEUE_SIZE = 1000; - /////////////////////// Instance Methods /////////////////////// - + /////////////////////// Instance Methods /////////////////////// + /** - * Returns the maximum number of milliseconds a - * <code>netSearch</code> operation can take before the cache member - * is considered to be unhealthy. + * Returns the maximum number of milliseconds a <code>netSearch</code> operation can take before + * the cache member is considered to be unhealthy. * * @see #DEFAULT_MAX_NET_SEARCH_TIME */ public long getMaxNetSearchTime(); /** - * Sets the maximum number of milliseconds a - * <code>netSearch</code> operation can take before the cache member - * is considered to be unhealthy. + * Sets the maximum number of milliseconds a <code>netSearch</code> operation can take before the + * cache member is considered to be unhealthy. * * @see #getMaxNetSearchTime */ public void setMaxNetSearchTime(long maxNetSearchTime); /** - * Returns the maximum mumber of milliseconds a cache - * <code>load</code> operation can take before the cache member is - * considered to be unhealthy. + * Returns the maximum mumber of milliseconds a cache <code>load</code> operation can take before + * the cache member is considered to be unhealthy. * * @see #DEFAULT_MAX_LOAD_TIME */ public long getMaxLoadTime(); /** - * Sets the maximum mumber of milliseconds a cache - * <code>load</code> operation can take before the cache member is - * considered to be unhealthy. + * Sets the maximum mumber of milliseconds a cache <code>load</code> operation can take before the + * cache member is considered to be unhealthy. * * @see #getMaxLoadTime */ @@ -138,16 +135,14 @@ public interface CacheHealthConfig { public void setMinHitRatio(double minHitRatio); /** - * Returns the maximum number of entries in the event delivery queue - * of a healthy cache member. + * Returns the maximum number of entries in the event delivery queue of a healthy cache member. * * @see #DEFAULT_MAX_EVENT_QUEUE_SIZE */ public long getMaxEventQueueSize(); /** - * Sets the maximum number of entries in the event delivery queue - * of a healthy cache member. + * Sets the maximum number of entries in the event delivery queue of a healthy cache member. * * @see #getMaxEventQueueSize */ http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/CacheServer.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/CacheServer.java b/geode-core/src/main/java/org/apache/geode/admin/CacheServer.java index 0149a05..a229281 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/CacheServer.java +++ b/geode-core/src/main/java/org/apache/geode/admin/CacheServer.java @@ -1,24 +1,21 @@ /* - * 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 dedicated cache server VM that is managed by the administration - * API. + * A dedicated cache server VM that is managed by the administration API. * * @since GemFire 4.0 * @deprecated as of 5.7 use {@link CacheVm} instead. @@ -27,15 +24,16 @@ package org.apache.geode.admin; public interface CacheServer extends SystemMember, ManagedEntity { /** * Returns the configuration of this cache vm + * * @deprecated as of 5.7 use {@link CacheVm#getVmConfig} instead. */ @Deprecated public CacheServerConfig getConfig(); + /** * Find whether this server is primary for given client (durableClientId) * - * @param durableClientId - - * durable-id of the client + * @param durableClientId - durable-id of the client * @return true if the server is primary for given client * * @since GemFire 5.6
