http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/GemFireMemberStatus.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/GemFireMemberStatus.java b/geode-core/src/main/java/org/apache/geode/admin/GemFireMemberStatus.java index b785125..5b4e59e 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/GemFireMemberStatus.java +++ b/geode-core/src/main/java/org/apache/geode/admin/GemFireMemberStatus.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; @@ -39,10 +37,12 @@ import java.net.InetAddress; import java.util.*; /** - * Class <code>GemFireMemberStatus</code> provides the status of a specific - * GemFire member VM. This VM can be a peer, a client, a server and/or a - * gateway. - * @deprecated as of 7.0 use the <code><a href="{@docRoot}/org/apache/geode/management/package-summary.html">management</a></code> package instead + * Class <code>GemFireMemberStatus</code> provides the status of a specific GemFire member VM. This + * VM can be a peer, a client, a server and/or a gateway. + * + * @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 GemFireMemberStatus implements Serializable { private static final long serialVersionUID = 3389997790525991310L; @@ -69,7 +69,7 @@ public class GemFireMemberStatus implements Serializable { protected boolean _isPrimaryGatewayHub; - protected Object/*GatewayHubStatus*/ _gatewayHubStatus; + protected Object/* GatewayHubStatus */ _gatewayHubStatus; protected boolean _isConnected; protected Serializable _memberId; @@ -96,11 +96,11 @@ public class GemFireMemberStatus implements Serializable { protected long _maximumHeapSize; protected long _freeHeapSize; - + protected long upTime = -1; protected transient final Cache cache; - + public GemFireMemberStatus() { this(null); } @@ -124,6 +124,7 @@ public class GemFireMemberStatus implements Serializable { /** * Returns whether this member is a client to a cache server + * * @return whether this member is a client to a cache server */ public boolean getIsClient() { @@ -132,8 +133,8 @@ public class GemFireMemberStatus implements Serializable { /** * Sets whether this member is a client to a cache server - * @param isClient Boolean defining whether this member is a client to a - * cache server + * + * @param isClient Boolean defining whether this member is a client to a cache server */ protected void setIsClient(boolean isClient) { this._isClient = isClient; @@ -141,6 +142,7 @@ public class GemFireMemberStatus implements Serializable { /** * Returns whether this member is a cache server + * * @return whether this member is a cache server */ public boolean getIsServer() { @@ -149,6 +151,7 @@ public class GemFireMemberStatus implements Serializable { /** * Sets whether this member is a cache server + * * @param isServer Boolean defining whether this member is a cache server */ protected void setIsServer(boolean isServer) { @@ -156,15 +159,16 @@ public class GemFireMemberStatus implements Serializable { } public int getServerPort() { - return this._serverPort; + return this._serverPort; } - + protected void setServerPort(int port) { - this._serverPort = port; + this._serverPort = port; } - + /** * Returns whether this member is a hub for WAN gateways + * * @return whether this member is a hub for WAN gateways */ public boolean getIsGatewayHub() { @@ -173,8 +177,8 @@ public class GemFireMemberStatus implements Serializable { /** * Sets whether this member is a cache server - * @param isGatewayHub Boolean defining whether this member is a hub for - * WAN gateways + * + * @param isGatewayHub Boolean defining whether this member is a hub for WAN gateways */ protected void setIsGatewayHub(boolean isGatewayHub) { this._isGatewayHub = isGatewayHub; @@ -198,15 +202,16 @@ public class GemFireMemberStatus implements Serializable { /** * For internal use only + * * @return status of the gateway hub */ - public Object/*GatewayHubStatus*/ getGatewayHubStatus() { + public Object/* GatewayHubStatus */ getGatewayHubStatus() { return this._gatewayHubStatus; } -// protected void setGatewayHubStatus(GatewayHubStatus gatewayHubStatus) { -// this._gatewayHubStatus = gatewayHubStatus; -// } + // protected void setGatewayHubStatus(GatewayHubStatus gatewayHubStatus) { + // this._gatewayHubStatus = gatewayHubStatus; + // } public boolean getIsSecondaryGatewayHub() { return !this._isPrimaryGatewayHub; @@ -253,7 +258,7 @@ public class GemFireMemberStatus implements Serializable { } public Map getOutgoingGateways() { - return this._outgoingGateways; + return this._outgoingGateways; } public Map getConnectedIncomingGateways() { @@ -284,42 +289,44 @@ public class GemFireMemberStatus implements Serializable { public Map getClientHealthStats() { return this._clientHealthStats; } - + protected void setClientHealthStats(Map stats) { this._clientHealthStats = stats; } - + /** * For internal use only + * * @param clientID client for health * @return the client's health */ - public Object/*ClientHealthStats*/ getClientHealthStats(String clientID) { + public Object/* ClientHealthStats */ getClientHealthStats(String clientID) { return this._clientHealthStats.get(clientID); } - + protected void setClientHealthStats(String clientID, ClientHealthStats stats) { this._clientHealthStats.put(clientID, stats); } - + protected void putClientHostName(String clientId, String hostName) { this._clientHostNames.put(clientId, hostName); } - + public String getClientHostName(String clientId) { - return (String)this._clientHostNames.get(clientId); + return (String) this._clientHostNames.get(clientId); } - + public Map getRegionStatuses() { return this._regionStatuses; } /** * For internal use only + * * @param fullRegionPath region path * @return status for the region */ - public Object/*RegionStatus*/ getRegionStatus(String fullRegionPath) { + public Object/* RegionStatus */ getRegionStatus(String fullRegionPath) { return getRegionStatuses().get(fullRegionPath); } @@ -402,11 +409,11 @@ public class GemFireMemberStatus implements Serializable { public long getUsedHeapSize() { return getMaximumHeapSize() - getFreeHeapSize(); } - + public long getUpTime() { return upTime; } - + public void setUpTime(long upTime) { this.upTime = upTime; } @@ -414,66 +421,29 @@ public class GemFireMemberStatus implements Serializable { @Override public String toString() { StringBuffer buffer = new StringBuffer(); - buffer - .append("GemFireMemberStatus[") - .append("isConnected=") - .append(this._isConnected) - .append("; memberName=") - .append(this._memberName) - .append("; memberId=") - .append(this._memberId) - .append("; hostAddress=") - .append(this._hostAddress) - .append("; mcastPort=") - .append(this._mcastPort) - .append("; mcastAddress=") - .append(this._mcastAddress) - .append("; bindAddress=") - .append(this._bindAddress) - .append("; serverPort=") - .append(this._serverPort) - .append("; locators=") - .append(this._locators) - .append("; isClient=") - .append(this._isClient) - .append("; isServer=") - .append(this._isServer) - .append("; isGatewayHub=") - .append(this._isGatewayHub) - .append("; isLocator=") - .append(this._isLocator) - .append("; isPrimaryGatewayHub=") - .append(this._isPrimaryGatewayHub) - .append("; gatewayHubStatus=") - .append(this._gatewayHubStatus) - .append("; connectedPeers=") - .append(this._connectedPeers) - .append("; connectedServers=") - .append(this._connectedServers) - .append("; unconnectedServers=") - .append(this._unconnectedServers) - .append("; connectedClients=") - .append(this._connectedClients) - .append("; clientHostNames=") - .append(this._clientHostNames) - .append("; clientQueueSizes=") - .append(this._clientQueueSizes) - .append("; clientHealthStats=") - .append(this._clientHealthStats) - .append("; gatewayQueueSizes=") - .append(this._gatewayQueueSizes) - .append("; regionStatuses=") - .append(this._regionStatuses) - .append("; maximumHeapSize=") - .append(this._maximumHeapSize) - .append("; freeHeapSize=") - .append(this._freeHeapSize) - .append("; upTime=") - .append(this.upTime) - .append("]"); + buffer.append("GemFireMemberStatus[").append("isConnected=").append(this._isConnected) + .append("; memberName=").append(this._memberName).append("; memberId=") + .append(this._memberId).append("; hostAddress=").append(this._hostAddress) + .append("; mcastPort=").append(this._mcastPort).append("; mcastAddress=") + .append(this._mcastAddress).append("; bindAddress=").append(this._bindAddress) + .append("; serverPort=").append(this._serverPort).append("; locators=") + .append(this._locators).append("; isClient=").append(this._isClient).append("; isServer=") + .append(this._isServer).append("; isGatewayHub=").append(this._isGatewayHub) + .append("; isLocator=").append(this._isLocator).append("; isPrimaryGatewayHub=") + .append(this._isPrimaryGatewayHub).append("; gatewayHubStatus=") + .append(this._gatewayHubStatus).append("; connectedPeers=").append(this._connectedPeers) + .append("; connectedServers=").append(this._connectedServers) + .append("; unconnectedServers=").append(this._unconnectedServers) + .append("; connectedClients=").append(this._connectedClients).append("; clientHostNames=") + .append(this._clientHostNames).append("; clientQueueSizes=").append(this._clientQueueSizes) + .append("; clientHealthStats=").append(this._clientHealthStats) + .append("; gatewayQueueSizes=").append(this._gatewayQueueSizes).append("; regionStatuses=") + .append(this._regionStatuses).append("; maximumHeapSize=").append(this._maximumHeapSize) + .append("; freeHeapSize=").append(this._freeHeapSize).append("; upTime=") + .append(this.upTime).append("]"); return buffer.toString(); } - + protected void initialize(DistributedSystem distributedSystem) { // Initialize instance variables initializeInstanceVariables(); @@ -512,8 +482,8 @@ public class GemFireMemberStatus implements Serializable { // Variables for gateway hubs this._outgoingGateways = new HashMap(); - //this._connectedOutgoingGateways = new HashSet(); - //this._unconnectedOutgoingGateways = new HashSet(); + // this._connectedOutgoingGateways = new HashSet(); + // this._unconnectedOutgoingGateways = new HashSet(); this._connectedIncomingGateways = new HashMap(); this._gatewayQueueSizes = new HashMap(); @@ -537,55 +507,56 @@ public class GemFireMemberStatus implements Serializable { // The following method returns a map of client member id to a cache // client info. For now, keep track of the member ids in the set of // _connectedClients. - Map allConnectedClients = InternalClientMembership.getStatusForAllClientsIgnoreSubscriptionStatus(); + Map allConnectedClients = + InternalClientMembership.getStatusForAllClientsIgnoreSubscriptionStatus(); Iterator allConnectedClientsIterator = allConnectedClients.values().iterator(); while (allConnectedClientsIterator.hasNext()) { CacheClientStatus ccs = (CacheClientStatus) allConnectedClientsIterator.next(); addConnectedClient(ccs.getMemberId()); // host address is available directly by id, hence CacheClientStatus need not be populated - putClientHostName(ccs.getMemberId(), ccs.getHostAddress()); + putClientHostName(ccs.getMemberId(), ccs.getHostAddress()); } // Get client queue sizes Map clientQueueSize = getClientIDMap(InternalClientMembership.getClientQueueSizes()); setClientQueueSizes(clientQueueSize); - + // Set server acceptor port (set it based on the first CacheServer) CacheServer server = (CacheServer) servers.toArray()[0]; setServerPort(server.getPort()); - + // Get Client Health Stats -// Assert.assertTrue(cache != null); (cannot be null) - Region clientHealthMonitoringRegion = ClientHealthMonitoringRegion.getInstance( - (GemFireCacheImpl)cache); - if(clientHealthMonitoringRegion != null) { - String [] clients = (String[])clientHealthMonitoringRegion.keySet().toArray(new String[0]); + // Assert.assertTrue(cache != null); (cannot be null) + Region clientHealthMonitoringRegion = + ClientHealthMonitoringRegion.getInstance((GemFireCacheImpl) cache); + if (clientHealthMonitoringRegion != null) { + String[] clients = (String[]) clientHealthMonitoringRegion.keySet().toArray(new String[0]); for (int i = 0; i < clients.length; i++) { String clientId = clients[i]; - ClientHealthStats stats = (ClientHealthStats)clientHealthMonitoringRegion.get(clientId); + ClientHealthStats stats = (ClientHealthStats) clientHealthMonitoringRegion.get(clientId); setClientHealthStats(clientId, stats); - } + } } } } - - /** - * returning Map of client queue size against client Id - * - * param clientMap is a Map of client queue size against ClientProxyMembershipID - */ - private Map getClientIDMap(Map ClientProxyMembershipIDMap) { - Map clientIdMap = new HashMap(); - Set entrySet = ClientProxyMembershipIDMap.entrySet(); - Iterator entries = entrySet.iterator(); - while (entries.hasNext()) { - Map.Entry entry = (Map.Entry)entries.next(); - ClientProxyMembershipID key = (ClientProxyMembershipID)entry.getKey(); - Integer size = (Integer)entry.getValue(); - clientIdMap.put(key.getDSMembership(), size); - } - return clientIdMap; - } + + /** + * returning Map of client queue size against client Id + * + * param clientMap is a Map of client queue size against ClientProxyMembershipID + */ + private Map getClientIDMap(Map ClientProxyMembershipIDMap) { + Map clientIdMap = new HashMap(); + Set entrySet = ClientProxyMembershipIDMap.entrySet(); + Iterator entries = entrySet.iterator(); + while (entries.hasNext()) { + Map.Entry entry = (Map.Entry) entries.next(); + ClientProxyMembershipID key = (ClientProxyMembershipID) entry.getKey(); + Integer size = (Integer) entry.getValue(); + clientIdMap.put(key.getDSMembership(), size); + } + return clientIdMap; + } protected void initializeClient() { Map poolMap = PoolManager.getAll(); @@ -607,13 +578,13 @@ public class GemFireMemberStatus implements Serializable { while (connected.hasNext()) { Map.Entry entry = (Map.Entry) connected.next(); String server = (String) entry.getKey(); -// Integer connections = (Integer) entry.getValue(); -// if (connections.intValue()==0) { -// addUnconnectedServer(server); -// } else { - addConnectedServer(server); -// } - //System.out.println(connections.size() + " logical connnections to server " + server); + // Integer connections = (Integer) entry.getValue(); + // if (connections.intValue()==0) { + // addUnconnectedServer(server); + // } else { + addConnectedServer(server); + // } + // System.out.println(connections.size() + " logical connnections to server " + server); } } } @@ -646,9 +617,9 @@ public class GemFireMemberStatus implements Serializable { setUpTime(System.currentTimeMillis() - ids.getStartTime()); try { setHostAddress((bindAddress != null && bindAddress.length() > 0) - ? InetAddress.getByName(bindAddress) - : SocketCreator.getLocalHost()); - } catch (IOException e) {/*ignore - leave null host address*/} + ? InetAddress.getByName(bindAddress) : SocketCreator.getLocalHost()); + } catch (IOException e) { + /* ignore - leave null host address */} } protected void initializePeers(DistributedSystem distributedSystem) { @@ -656,17 +627,18 @@ public class GemFireMemberStatus implements Serializable { DM dm = ids.getDistributionManager(); Set connections = dm.getOtherNormalDistributionManagerIds(); Set connectionsIDs = new HashSet(connections.size()); - for (Iterator iter=connections.iterator(); iter.hasNext() ; ) { - InternalDistributedMember idm = (InternalDistributedMember)iter.next(); + for (Iterator iter = connections.iterator(); iter.hasNext();) { + InternalDistributedMember idm = (InternalDistributedMember) iter.next(); connectionsIDs.add(idm.getId()); } setConnectedPeers(connectionsIDs); } protected void initializeMemory() { - //InternalDistributedSystem system = (InternalDistributedSystem) region.getCache().getDistributedSystem(); - //GemFireStatSampler sampler = system.getStatSampler(); - //VMStatsContract statsContract = sampler.getVMStats(); + // InternalDistributedSystem system = (InternalDistributedSystem) + // region.getCache().getDistributedSystem(); + // GemFireStatSampler sampler = system.getStatSampler(); + // VMStatsContract statsContract = sampler.getVMStats(); Runtime rt = Runtime.getRuntime(); setMaximumHeapSize(rt.maxMemory()); @@ -680,15 +652,15 @@ public class GemFireMemberStatus implements Serializable { LocalRegion rootRegion = (LocalRegion) rootRegions.next(); if (!(rootRegion instanceof HARegion)) { RegionStatus rootRegionStatus = rootRegion instanceof PartitionedRegion - ? new PartitionedRegionStatus((PartitionedRegion) rootRegion) - : new RegionStatus(rootRegion); + ? new PartitionedRegionStatus((PartitionedRegion) rootRegion) + : new RegionStatus(rootRegion); putRegionStatus(rootRegion.getFullPath(), rootRegionStatus); Iterator subRegions = rootRegion.subregions(true).iterator(); while (subRegions.hasNext()) { LocalRegion subRegion = (LocalRegion) subRegions.next(); RegionStatus subRegionStatus = subRegion instanceof PartitionedRegion - ? new PartitionedRegionStatus((PartitionedRegion) subRegion) - : new RegionStatus(subRegion); + ? new PartitionedRegionStatus((PartitionedRegion) subRegion) + : new RegionStatus(subRegion); putRegionStatus(subRegion.getFullPath(), subRegionStatus); } }
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/ManagedEntity.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/ManagedEntity.java b/geode-core/src/main/java/org/apache/geode/admin/ManagedEntity.java index 0b4851e..1eaa892 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/ManagedEntity.java +++ b/geode-core/src/main/java/org/apache/geode/admin/ManagedEntity.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; @@ -22,101 +20,79 @@ package org.apache.geode.admin; * @see ManagedEntityConfig * * @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 interface ManagedEntity { /** - * Starts this managed entity. Note that this method may return - * before the managed entity is actually started. + * Starts this managed entity. Note that this method may return before the managed entity is + * actually started. * - * @throws AdminException - * If a problem is encountered while starting this managed - * entity. - * @throws IllegalStateException - * If this managed entity resides on a remote machine and a - * <code>null</code> or empty (<code>""</code>) {@linkplain - * ManagedEntityConfig#getRemoteCommand remote command} has - * been specified. + * @throws AdminException If a problem is encountered while starting this managed entity. + * @throws IllegalStateException If this managed entity resides on a remote machine and a + * <code>null</code> or empty (<code>""</code>) + * {@linkplain ManagedEntityConfig#getRemoteCommand remote command} has been specified. * * @see #waitToStart */ public void start() throws AdminException; /** - * Stops this managed entity. Note that this method may return - * before the managed entity is actually stopped. + * Stops this managed entity. Note that this method may return before the managed entity is + * actually stopped. * - * @throws AdminException - * If a problem is encountered while stopping this managed - * entity. - * @throws IllegalStateException - * If this managed entity resides on a remote machine and a - * <code>null</code> or empty (<code>""</code>) {@linkplain - * ManagedEntityConfig#getRemoteCommand remote command} has - * been specified. + * @throws AdminException If a problem is encountered while stopping this managed entity. + * @throws IllegalStateException If this managed entity resides on a remote machine and a + * <code>null</code> or empty (<code>""</code>) + * {@linkplain ManagedEntityConfig#getRemoteCommand remote command} has been specified. * * @see #waitToStop */ public void stop() throws AdminException; /** - * Waits for up to a given number of milliseconds for this managed - * entity to {@linkplain #start start}. + * Waits for up to a given number of milliseconds for this managed entity to {@linkplain #start + * start}. * - * @param timeout - * The number of milliseconds to wait for this managed entity - * to start. + * @param timeout The number of milliseconds to wait for this managed entity to start. * - * @return Whether or not the entity has started. - * <code>false</code>, if the method times out. + * @return Whether or not the entity has started. <code>false</code>, if the method times out. * - * @throws InterruptedException - * If the thread invoking this method is interrupted while - * waiting. + * @throws InterruptedException If the thread invoking this method is interrupted while waiting. */ - public boolean waitToStart(long timeout) - throws InterruptedException; + public boolean waitToStart(long timeout) throws InterruptedException; /** - * Waits for up to a given number of milliseconds for this managed - * entity to {@linkplain #stop stop}. + * Waits for up to a given number of milliseconds for this managed entity to {@linkplain #stop + * stop}. * - * @param timeout - * The number of milliseconds to wait for this managed entity - * to stop. + * @param timeout The number of milliseconds to wait for this managed entity to stop. * - * @return Whether or not the entity has stopped. - * <code>false</code>, if the method times out. + * @return Whether or not the entity has stopped. <code>false</code>, if the method times out. * - * @throws InterruptedException - * If the thread invoking this method is interrupted while - * waiting. + * @throws InterruptedException If the thread invoking this method is interrupted while waiting. */ - public boolean waitToStop(long timeout) - throws InterruptedException; + public boolean waitToStop(long timeout) throws InterruptedException; /** - * Returns whether or not this managed entity is running. Note that - * this operation may attempt to contact the managed entity. + * Returns whether or not this managed entity is running. Note that this operation may attempt to + * contact the managed entity. * - * @throws IllegalStateException - * If this managed entity resides on a remote machine and a - * <code>null</code> or empty (<code>""</code>) {@linkplain - * ManagedEntityConfig#getRemoteCommand remote command} has - * been specified. + * @throws IllegalStateException If this managed entity resides on a remote machine and a + * <code>null</code> or empty (<code>""</code>) + * {@linkplain ManagedEntityConfig#getRemoteCommand remote command} has been specified. */ public boolean isRunning(); /** - * Returns the tail of this manage entity's log file. Note that not - * all managed entities implement this functionality. + * Returns the tail of this manage entity's log file. Note that not all managed entities implement + * this functionality. * - * @throws AdminException - * If a problem is encountered while getting the log of this - * managed entity. - * @throws UnsupportedOperationException - * If this managed entity does not support retrieving its + * @throws AdminException If a problem is encountered while getting the log of this managed + * entity. + * @throws UnsupportedOperationException If this managed entity does not support retrieving its * log. */ public String getLog() throws AdminException; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/ManagedEntityConfig.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/ManagedEntityConfig.java b/geode-core/src/main/java/org/apache/geode/admin/ManagedEntityConfig.java index 9a95b44..0b7acd7 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/ManagedEntityConfig.java +++ b/geode-core/src/main/java/org/apache/geode/admin/ManagedEntityConfig.java @@ -1,38 +1,35 @@ /* - * 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; /** - * Common configuration for all entities that can be managed using the - * GemFire administration API. Note that once a managed entity has - * been {@linkplain ManagedEntity#start started}, attempts to modify - * its configuration will cause an {@link IllegalStateException} to be - * thrown. + * Common configuration for all entities that can be managed using the GemFire administration API. + * Note that once a managed entity has been {@linkplain ManagedEntity#start started}, attempts to + * modify its configuration will cause an {@link IllegalStateException} to be thrown. * * @see ManagedEntity * * @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 interface ManagedEntityConfig extends Cloneable { /** - * Returns the name of the host on which the managed entity runs or - * will run. + * Returns the name of the host on which the managed entity runs or will run. */ public String getHost(); @@ -42,58 +39,50 @@ public interface ManagedEntityConfig extends Cloneable { public void setHost(String host); /** - * Returns the name of the working directory in which the managed - * entity runs or will run. + * Returns the name of the working directory in which the managed entity runs or will run. */ public String getWorkingDirectory(); /** - * Sets the name of the working directory in which the managed - * entity will run. + * Sets the name of the working directory in which the managed entity will run. */ public void setWorkingDirectory(String dir); /** - * Returns the name of the GemFire product directory to use when - * administering the managed entity. + * Returns the name of the GemFire product directory to use when administering the managed entity. */ public String getProductDirectory(); /** - * Sets the name of the GemFire product directory to use when - * administering the managed entity. + * Sets the name of the GemFire product directory to use when administering the managed entity. */ public void setProductDirectory(String dir); /** - * Returns the command prefix used to administer a managed entity - * that is hosted on a remote machine. If the remote command is - * <code>null</code> (the default value), then the remote command - * associated with the {@linkplain - * AdminDistributedSystem#getRemoteCommand() distributed system} - * will be used. + * Returns the command prefix used to administer a managed entity that is hosted on a remote + * machine. If the remote command is <code>null</code> (the default value), then the remote + * command associated with the {@linkplain AdminDistributedSystem#getRemoteCommand() distributed + * system} will be used. */ public String getRemoteCommand(); /** - * Sets the command prefix used to administer a managed entity that - * is hosted on a remote machine. + * Sets the command prefix used to administer a managed entity that is hosted on a remote machine. */ public void setRemoteCommand(String remoteCommand); /** * Validates this configuration. * - * @throws IllegalStateException - * If a managed entity cannot be administered using this - * configuration + * @throws IllegalStateException If a managed entity cannot be administered using this + * configuration */ public void validate(); /** - * Returns a new <code>ManagedEntityConfig</code> with the same - * configuration as this <code>ManagedEntityConfig</code>. + * Returns a new <code>ManagedEntityConfig</code> with the same configuration as this + * <code>ManagedEntityConfig</code>. */ - public Object clone() throws CloneNotSupportedException; + public Object clone() throws CloneNotSupportedException; } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/MemberHealthConfig.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/MemberHealthConfig.java b/geode-core/src/main/java/org/apache/geode/admin/MemberHealthConfig.java index e0a90c6..63dd605 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/MemberHealthConfig.java +++ b/geode-core/src/main/java/org/apache/geode/admin/MemberHealthConfig.java @@ -1,45 +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; /** - * Provides configuration information relating to the health of a - * member of a GemFire distributed system. + * Provides configuration information relating to the health of a member of a GemFire distributed + * system. * * <P> * - * If any of the following criteria is true, then a member is - * considered to be in {@link GemFireHealth#OKAY_HEALTH OKAY_HEALTH}. + * If any of the following criteria is true, then a member is considered to be in + * {@link GemFireHealth#OKAY_HEALTH OKAY_HEALTH}. * * <UL> * - * <LI>The size of the {@linkplain #getMaxVMProcessSize VM process} is - * too large.</LI> + * <LI>The size of the {@linkplain #getMaxVMProcessSize VM process} is too large.</LI> * - * <LI>There are too many {@linkplain #getMaxMessageQueueSize enqueued} - * incoming/outgoing messages.</LI> + * <LI>There are too many {@linkplain #getMaxMessageQueueSize enqueued} incoming/outgoing + * messages.</LI> * - * <LI>Too many message sends {@link #getMaxReplyTimeouts timeout} - * while waiting for a reply.</LI> + * <LI>Too many message sends {@link #getMaxReplyTimeouts timeout} while waiting for a reply.</LI> * * </UL> * - * If any of the following criteria is true, then a member is - * considered to be in {@link GemFireHealth#POOR_HEALTH POOR_HEALTH}. + * If any of the following criteria is true, then a member is considered to be in + * {@link GemFireHealth#POOR_HEALTH POOR_HEALTH}. * * <UL> * @@ -47,95 +43,100 @@ 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 MemberHealthConfig { - /** The default maximum VM process size (in megabytes) of a health - * member of the distributed system. The default value is 1000. */ + /** + * The default maximum VM process size (in megabytes) of a health member of the distributed + * system. The default value is 1000. + */ public static final long DEFAULT_MAX_VM_PROCESS_SIZE = 1000; - /** The default maximum number of enqueued incoming or outgoing - * messages that a healthy member of a distributed system can have. - * The default value is 1000. */ + /** + * The default maximum number of enqueued incoming or outgoing messages that a healthy member of a + * distributed system can have. The default value is 1000. + */ public static final long DEFAULT_MAX_MESSAGE_QUEUE_SIZE = 1000; - /** The default maximum number of message reply timeouts that can - * occur in a given health monitoring interval. The default value - * is zero. */ + /** + * The default maximum number of message reply timeouts that can occur in a given health + * monitoring interval. The default value is zero. + */ public static final long DEFAULT_MAX_REPLY_TIMEOUTS = 0; - /** The default maximum multicast retransmission ratio. The default - * value is 0.20 (twenty percent of messages retransmitted) + /** + * The default maximum multicast retransmission ratio. The default value is 0.20 (twenty percent + * of messages retransmitted) */ public static final double DEFAULT_MAX_RETRANSMISSION_RATIO = 0.20; - - /////////////////////// Instance Methods /////////////////////// + + /////////////////////// Instance Methods /////////////////////// /** - * Returns the maximum VM process size (in megabytes) of a healthy - * member of the distributed system. + * Returns the maximum VM process size (in megabytes) of a healthy member of the distributed + * system. * * @see #DEFAULT_MAX_VM_PROCESS_SIZE */ public long getMaxVMProcessSize(); /** - * Sets the maximum VM process size (in megabytes) of a healthy - * member of the distributed system. + * Sets the maximum VM process size (in megabytes) of a healthy member of the distributed system. * * @see #getMaxVMProcessSize */ public void setMaxVMProcessSize(long size); - + /** - * Returns the maximum number of enqueued incoming or outgoing - * messages that a healthy member of a distributed system can have. + * Returns the maximum number of enqueued incoming or outgoing messages that a healthy member of a + * distributed system can have. * * @see #DEFAULT_MAX_MESSAGE_QUEUE_SIZE */ public long getMaxMessageQueueSize(); /** - * Sets the maximum number of enqueued incoming or outgoing - * messages that a healthy member of a distributed system can have. + * Sets the maximum number of enqueued incoming or outgoing messages that a healthy member of a + * distributed system can have. * * @see #getMaxMessageQueueSize */ public void setMaxMessageQueueSize(long maxMessageQueueSize); /** - * Returns the maximum number message replies that can timeout in a - * healthy member. + * Returns the maximum number message replies that can timeout in a healthy member. * * @see #DEFAULT_MAX_REPLY_TIMEOUTS */ public long getMaxReplyTimeouts(); /** - * Sets the maximum number message replies that can timeout in a - * healthy member. + * Sets the maximum number message replies that can timeout in a healthy member. * * @see #getMaxReplyTimeouts */ public void setMaxReplyTimeouts(long maxReplyTimeouts); /** - * Returns the maximum ratio of multicast retransmissions / total multicast - * messages. Retransmissions are requestor-specific (i.e., unicast), so - * a single lost message may result in multiple retransmissions.<p> - * A high retransmission ratio may indicate - * poor network conditions requiring reduced flow-control settings, - * a udp-fragment-size setting that is too high. + * Returns the maximum ratio of multicast retransmissions / total multicast messages. + * Retransmissions are requestor-specific (i.e., unicast), so a single lost message may result in + * multiple retransmissions. + * <p> + * A high retransmission ratio may indicate poor network conditions requiring reduced flow-control + * settings, a udp-fragment-size setting that is too high. + * * @see #DEFAULT_MAX_RETRANSMISSION_RATIO */ public double getMaxRetransmissionRatio(); - + /** - * Sets the maximum ratio of multicast retransmissions / total multicast - * messages. + * Sets the maximum ratio of multicast retransmissions / total multicast messages. + * * @see #getMaxRetransmissionRatio */ public void setMaxRetransmissionRatio(double ratio); - + } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/OperationCancelledException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/OperationCancelledException.java b/geode-core/src/main/java/org/apache/geode/admin/OperationCancelledException.java index d765c21..0328641 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/OperationCancelledException.java +++ b/geode-core/src/main/java/org/apache/geode/admin/OperationCancelledException.java @@ -1,48 +1,47 @@ /* - * 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.GemFireException; +// import org.apache.geode.GemFireException; /** - * Thrown when an administration operation that accesses information - * in a remote system member is cancelled. The cancelation may occur - * because the system member has left the distributed system. + * Thrown when an administration operation that accesses information in a remote system member is + * cancelled. The cancelation may occur because the system member has left the distributed system. * * @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 OperationCancelledException extends RuntimeAdminException { - private static final long serialVersionUID = 5474068770227602546L; - - public OperationCancelledException() { - super(); - } - - public OperationCancelledException( String message ) { - super( message ); - } - - public OperationCancelledException( Throwable cause ){ - super(cause); - } - - public OperationCancelledException( String message, Throwable cause ) { - super(message, cause); - } + private static final long serialVersionUID = 5474068770227602546L; + + public OperationCancelledException() { + super(); + } + + public OperationCancelledException(String message) { + super(message); + } + + public OperationCancelledException(Throwable cause) { + super(cause); + } + + public OperationCancelledException(String message, Throwable cause) { + super(message, cause); + } } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/RegionNotFoundException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/RegionNotFoundException.java b/geode-core/src/main/java/org/apache/geode/admin/RegionNotFoundException.java index 29dfa98..e849a70 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/RegionNotFoundException.java +++ b/geode-core/src/main/java/org/apache/geode/admin/RegionNotFoundException.java @@ -1,39 +1,39 @@ /* - * 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.cache.CacheException; +// import org.apache.geode.cache.CacheException; import org.apache.geode.cache.CacheRuntimeException; /** - * Thrown by the administration API when the region administered by a - * {@link SystemMemberRegion} has been closed or destroyed in system - * member. - * <P>Also thrown by {@link org.apache.geode.DataSerializer#readRegion(java.io.DataInput)} - * if the named region no longer exists. + * Thrown by the administration API when the region administered by a {@link SystemMemberRegion} has + * been closed or destroyed in system member. + * <P> + * Also thrown by {@link org.apache.geode.DataSerializer#readRegion(java.io.DataInput)} if the named + * region no longer exists. * * @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 RegionNotFoundException extends CacheRuntimeException { -private static final long serialVersionUID = 1758668137691463909L; + private static final long serialVersionUID = 1758668137691463909L; public RegionNotFoundException(String message) { super(message); } - + } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.java b/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.java index 1945566..19f89b2 100644 --- a/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.java +++ b/geode-core/src/main/java/org/apache/geode/admin/RegionSubRegionSnapshot.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; @@ -30,16 +28,18 @@ import org.apache.geode.i18n.LogWriterI18n; import org.apache.geode.internal.cache.PartitionedRegion; /** - * Class <code>RegionSubRegionSnapshot</code> provides information about - * <code>Region</code>s. This also provides the information about sub regions - * This class is used by the monitoring tool. + * Class <code>RegionSubRegionSnapshot</code> provides information about <code>Region</code>s. This + * also provides the information about sub regions This class is used by the monitoring tool. * * * @since GemFire 5.7 - * @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 RegionSubRegionSnapshot implements DataSerializable { private static final long serialVersionUID = -8052137675270041871L; + public RegionSubRegionSnapshot() { this.parent = null; this.subRegionSnapshots = new HashSet(); @@ -49,25 +49,22 @@ public class RegionSubRegionSnapshot implements DataSerializable { this(); this.name = reg.getName(); if (reg instanceof PartitionedRegion) { - PartitionedRegion p_reg = (PartitionedRegion)reg; + PartitionedRegion p_reg = (PartitionedRegion) reg; this.entryCount = p_reg.entryCount(true); - } - else { + } else { this.entryCount = reg.entrySet().size(); } final LogWriterI18n logger = reg.getCache().getLoggerI18n(); - if((logger != null) && logger.fineEnabled()) { - logger.fine( - "RegionSubRegionSnapshot Region entry count =" + this.entryCount - + " for region =" + this.name); + if ((logger != null) && logger.fineEnabled()) { + logger.fine("RegionSubRegionSnapshot Region entry count =" + this.entryCount + " for region =" + + this.name); } } /** * add the snapshot of sub region * - * @param snap - * snapshot of sub region + * @param snap snapshot of sub region * @return true if operation is successful */ public boolean addSubRegion(RegionSubRegionSnapshot snap) { @@ -91,8 +88,7 @@ public class RegionSubRegionSnapshot implements DataSerializable { } /** - * @param entryCount - * entry count of region + * @param entryCount entry count of region */ public final void setEntryCount(int entryCount) { this.entryCount = entryCount; @@ -106,8 +102,7 @@ public class RegionSubRegionSnapshot implements DataSerializable { } /** - * @param name - * name of region + * @param name name of region */ public final void setName(String name) { this.name = name; @@ -121,8 +116,7 @@ public class RegionSubRegionSnapshot implements DataSerializable { } /** - * @param subRegionSnapshots - * subRegionSnapshots of all the sub regions + * @param subRegionSnapshots subRegionSnapshots of all the sub regions */ public final void setSubRegionSnapshots(Set subRegionSnapshots) { this.subRegionSnapshots = subRegionSnapshots; @@ -136,8 +130,7 @@ public class RegionSubRegionSnapshot implements DataSerializable { } /** - * @param parent - * snapshot of parent region + * @param parent snapshot of parent region */ public final void setParent(RegionSubRegionSnapshot parent) { this.parent = parent; @@ -148,14 +141,13 @@ public class RegionSubRegionSnapshot implements DataSerializable { * @return full path of region */ public String getFullPath() { - return (getParent() == null ? "/" : getParent().getFullPath()) + getName() - + "/"; + return (getParent() == null ? "/" : getParent().getFullPath()) + getName() + "/"; } public void toData(DataOutput out) throws IOException { DataSerializer.writeString(this.name, out); out.writeInt(this.entryCount); - DataSerializer.writeHashSet((HashSet)this.subRegionSnapshots, out); + DataSerializer.writeHashSet((HashSet) this.subRegionSnapshots, out); } public void fromData(DataInput in) throws IOException, ClassNotFoundException { @@ -163,19 +155,18 @@ public class RegionSubRegionSnapshot implements DataSerializable { this.entryCount = in.readInt(); this.subRegionSnapshots = DataSerializer.readHashSet(in); for (Iterator iter = this.subRegionSnapshots.iterator(); iter.hasNext();) { - ((RegionSubRegionSnapshot)iter.next()).setParent(this); + ((RegionSubRegionSnapshot) iter.next()).setParent(this); } } @Override public String toString() { - String toStr = "RegionSnapshot [" + "path=" + this.getFullPath() - + ",parent=" + (this.parent == null ? "null" : this.parent.name) - + ", entryCount=" + this.entryCount + ", subRegionCount=" - + this.subRegionSnapshots.size() + "<<"; + String toStr = "RegionSnapshot [" + "path=" + this.getFullPath() + ",parent=" + + (this.parent == null ? "null" : this.parent.name) + ", entryCount=" + this.entryCount + + ", subRegionCount=" + this.subRegionSnapshots.size() + "<<"; for (Iterator iter = subRegionSnapshots.iterator(); iter.hasNext();) { - toStr = toStr + ((RegionSubRegionSnapshot)iter.next()).getName() + ", "; + toStr = toStr + ((RegionSubRegionSnapshot) iter.next()).getName() + ", "; } toStr = toStr + ">>" + "]"; http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/RuntimeAdminException.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/RuntimeAdminException.java b/geode-core/src/main/java/org/apache/geode/admin/RuntimeAdminException.java index 7a28867..359033b 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/RuntimeAdminException.java +++ b/geode-core/src/main/java/org/apache/geode/admin/RuntimeAdminException.java @@ -1,32 +1,31 @@ /* - * 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 <code>RuntimeAdminException</code> is thrown when a runtime errors occurs - * during administration or monitoring of GemFire. + * A <code>RuntimeAdminException</code> is thrown when a runtime errors occurs during administration + * or monitoring of GemFire. * - * @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 RuntimeAdminException -extends org.apache.geode.GemFireException { +public class RuntimeAdminException extends org.apache.geode.GemFireException { private static final long serialVersionUID = -7512771113818634005L; @@ -45,5 +44,5 @@ extends org.apache.geode.GemFireException { public RuntimeAdminException(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/Statistic.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/Statistic.java b/geode-core/src/main/java/org/apache/geode/admin/Statistic.java index b1f1cc8..428281a 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/Statistic.java +++ b/geode-core/src/main/java/org/apache/geode/admin/Statistic.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,41 +18,42 @@ package org.apache.geode.admin; /** * Interface to represent a single statistic of a <code>StatisticResource</code> * - * @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 interface Statistic extends java.io.Serializable { - + /** * Gets the identifying name of this statistic. * - * @return the identifying name of this statistic + * @return the identifying name of this statistic */ public String getName(); - + /** * Gets the value of this statistic as a <code>java.lang.Number</code>. * * @return the value of this statistic */ public Number getValue(); - + /** * Gets the unit of measurement (if any) this statistic represents. * * @return the unit of measurement (if any) this statistic represents */ public String getUnits(); - + /** - * Returns true if this statistic represents a numeric value which always - * increases. + * Returns true if this statistic represents a numeric value which always increases. * * @return true if this statistic represents a value which always increases */ public boolean isCounter(); - + /** * Gets the full description of this statistic. * http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/StatisticResource.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/StatisticResource.java b/geode-core/src/main/java/org/apache/geode/admin/StatisticResource.java index 43c51cd..1300c6a 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/StatisticResource.java +++ b/geode-core/src/main/java/org/apache/geode/admin/StatisticResource.java @@ -1,32 +1,31 @@ /* - * 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; /** - * Adminitrative interface for monitoring a statistic resource in a GemFire - * system member. A resource is comprised of one or many - * <code>Statistics</code>. + * Adminitrative interface for monitoring a statistic resource in a GemFire system member. A + * resource is comprised of one or many <code>Statistics</code>. * - * @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 interface StatisticResource { - + /** * Gets the identifying name of this resource. * @@ -40,7 +39,7 @@ public interface StatisticResource { * @return the full description of this resource */ public String getDescription(); - + /** * Gets the classification type of this resource. * @@ -48,38 +47,36 @@ public interface StatisticResource { * @since GemFire 5.0 */ public String getType(); - + /** - * Returns a display string of the {@link SystemMember} owning this - * resource. + * Returns a display string of the {@link SystemMember} owning this resource. * * @return a display string of the owning {@link SystemMember} */ public String getOwner(); - + /** - * Returns an ID that uniquely identifies the resource within the - * {@link SystemMember} it belongs to. + * Returns an ID that uniquely identifies the resource within the {@link SystemMember} it belongs + * to. * * @return unique id within the owning {@link SystemMember} */ public long getUniqueId(); - + /** * Returns a read-only array of every {@link Statistic} in this resource. * * @return read-only array of every {@link Statistic} in this resource */ public Statistic[] getStatistics(); - + /** - * Refreshes the values of every {@link Statistic} in this resource by - * retrieving them from the member's VM. + * Refreshes the values of every {@link Statistic} in this resource by retrieving them from the + * member's VM. * - * @throws org.apache.geode.admin.AdminException - * if unable to refresh statistic values + * @throws org.apache.geode.admin.AdminException if unable to refresh statistic values */ public void refresh() throws org.apache.geode.admin.AdminException; - + } http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8bf39571/geode-core/src/main/java/org/apache/geode/admin/SystemMember.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/admin/SystemMember.java b/geode-core/src/main/java/org/apache/geode/admin/SystemMember.java index 78cc9aa..ffd3f06 100755 --- a/geode-core/src/main/java/org/apache/geode/admin/SystemMember.java +++ b/geode-core/src/main/java/org/apache/geode/admin/SystemMember.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; @@ -23,42 +21,42 @@ import java.net.InetAddress; /** * Administrative interface for monitoring a GemFire system member. * - * @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 interface SystemMember { - + /** Gets the {@link AdminDistributedSystem} this member belongs to. */ public AdminDistributedSystem getDistributedSystem(); - - /** - * Gets identifying name of this member. - * For applications this is the string form of {@link #getDistributedMember}. - * For cache servers it is a unique cache server string. + + /** + * Gets identifying name of this member. For applications this is the string form of + * {@link #getDistributedMember}. For cache servers it is a unique cache server string. */ public String getId(); - - /** - * Retrieves display friendly name for this member. If this member 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.SystemMember#getId}. + + /** + * Retrieves display friendly name for this member. If this member 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.SystemMember#getId}. * * @see org.apache.geode.distributed.DistributedSystem#connect * @see org.apache.geode.distributed.DistributedSystem#getName */ public String getName(); - + /** Gets the type of {@link SystemMemberType} this member is. */ public SystemMemberType getType(); - + /** Gets host name of the machine this member resides on. */ public String getHost(); /** Gets the host of this member as an <code>java.net.InetAddress<code>. */ public InetAddress getHostAddress(); - + /** Retrieves the log for this member. */ public String getLog(); @@ -67,66 +65,66 @@ public interface SystemMember { * * @deprecated Removed licensing in 8.0. */ - @Deprecated - public java.util.Properties getLicense(); + @Deprecated + public java.util.Properties getLicense(); /** Returns this member's GemFire version information. */ public String getVersion(); - - /** + + /** * Gets the configuration parameters for this member. */ public ConfigurationParameter[] getConfiguration(); - + /** - * Sets the configuration of this member. The argument is an array of any - * and all configuration parameters that are to be updated in the member. + * Sets the configuration of this member. The argument is an array of any and all configuration + * parameters that are to be updated in the member. * <p> * The entire array of configuration parameters is then returned. * * @param parms subset of the configuration parameters to be changed * @return all configuration parameters including those that were changed - * @throws org.apache.geode.admin.AdminException - * if this fails to make the configuration changes + * @throws org.apache.geode.admin.AdminException if this fails to make the configuration changes */ - public ConfigurationParameter[] setConfiguration(ConfigurationParameter[] parms) throws org.apache.geode.admin.AdminException; - + public ConfigurationParameter[] setConfiguration(ConfigurationParameter[] parms) + throws org.apache.geode.admin.AdminException; + /** Refreshes this member's configuration from the member or it's properties */ public void refreshConfig() throws org.apache.geode.admin.AdminException; - - /** - * Retrieves this members statistic resources. If the member is not running - * then an empty array is returned. + + /** + * Retrieves this members statistic resources. If the member is not running then an empty array is + * returned. * - *@param statisticsTypeName String ame of the Statistics Type + * @param statisticsTypeName String ame of the Statistics Type * @return array of runtime statistic resources owned by this member * @since GemFire 5.7 */ - public StatisticResource[] getStat(String statisticsTypeName) throws org.apache.geode.admin.AdminException; - - /** - * Retrieves this members statistic resources. If the member is not running - * then an empty array is returned. All Stats are returned + public StatisticResource[] getStat(String statisticsTypeName) + throws org.apache.geode.admin.AdminException; + + /** + * Retrieves this members statistic resources. If the member is not running then an empty array is + * returned. All Stats are returned * * @return array of runtime statistic resources owned by this member */ public StatisticResource[] getStats() throws org.apache.geode.admin.AdminException; - + /** - * Returns whether or not this system member hosts a GemFire {@link - * org.apache.geode.cache.Cache Cache}. + * Returns whether or not this system member hosts a GemFire {@link org.apache.geode.cache.Cache + * Cache}. * * @see #getCache */ - public boolean hasCache() - throws org.apache.geode.admin.AdminException; + public boolean hasCache() throws org.apache.geode.admin.AdminException; /** - * Returns an object that provides admin access to this member's cache. - * If the member currently has no cache then <code>null</code> is returned. + * Returns an object that provides admin access to this member's cache. If the member currently + * has no cache then <code>null</code> is returned. */ public SystemMemberCache getCache() throws org.apache.geode.admin.AdminException; - + /** * Returns the names of the membership roles filled by this member. * @@ -134,10 +132,10 @@ public interface SystemMember { * @since GemFire 5.0 */ public String[] getRoles(); - + /** - * Returns the {@link org.apache.geode.distributed.DistributedMember} - * that represents this system member. + * Returns the {@link org.apache.geode.distributed.DistributedMember} that represents this system + * member. * * @return DistributedMember instance representing this system member * @since GemFire 5.0
