You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2015/09/03 01:58:15 UTC
[10/17] incubator-geode git commit: renamed BridgeServerLoadMessage
to CacheServerLoadMessage
renamed BridgeServerLoadMessage to CacheServerLoadMessage
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/183ed7a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/183ed7a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/183ed7a0
Branch: refs/heads/feature/GEODE-243
Commit: 183ed7a01d252ea6e93ecfe194b8d762acbbb259
Parents: 9ea8f35
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Sep 2 11:51:11 2015 -0700
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Sep 2 11:51:11 2015 -0700
----------------------------------------------------------------------
.../internal/BridgeServerLoadMessage.java | 99 --------------------
.../client/internal/CacheServerLoadMessage.java | 99 ++++++++++++++++++++
.../cache/server/internal/LoadMonitor.java | 6 +-
.../gemstone/gemfire/internal/DSFIDFactory.java | 4 +-
.../internal/DataSerializableFixedID.java | 2 +-
.../sanctionedDataSerializables.txt | 2 +-
6 files changed, 106 insertions(+), 106 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/183ed7a0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/BridgeServerLoadMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/BridgeServerLoadMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/BridgeServerLoadMessage.java
deleted file mode 100644
index a419216..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/BridgeServerLoadMessage.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * more patents listed at http://www.pivotal.io/patents.
- *=========================================================================
- */
-package com.gemstone.gemfire.cache.client.internal;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.server.ServerLoad;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.SerialDistributionMessage;
-import com.gemstone.gemfire.distributed.internal.ServerLocation;
-import com.gemstone.gemfire.distributed.internal.ServerLocator;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-
-/**
- * A message from bridge server to locator to update the locator
- * with new load information from the bridge server.
- * Also includes the id of any clients whose estimate is no
- * longer needed on the server-locator.
- * @author dsmith
- * @since 5.7
- *
- */
-public class BridgeServerLoadMessage extends SerialDistributionMessage {
- protected ServerLoad load;
- protected ServerLocation location;
- protected ArrayList clientIds;
-
- public BridgeServerLoadMessage() {
- super();
- }
-
- public BridgeServerLoadMessage(ServerLoad load, ServerLocation location,
- ArrayList clientIds) {
- super();
- this.load = load;
- this.location = location;
- this.clientIds = clientIds;
- }
-
- @Override
- protected void process(DistributionManager dm) {
- updateLocalLocators();
- }
-
- public void updateLocalLocators() {
- List locators = Locator.getLocators();
- for (int i=0; i < locators.size(); i++) {
- InternalLocator l = (InternalLocator)locators.get(i);
- ServerLocator serverLocator = l.getServerLocatorAdvisee();
- if(serverLocator != null) {
- serverLocator.updateLoad(location, load, this.clientIds);
- }
- }
- }
-
-
-
- public int getDSFID() {
- return BRIDGE_SERVER_LOAD_MESSAGE;
- }
-
- @Override
- public void fromData(DataInput in) throws IOException, ClassNotFoundException {
- super.fromData(in);
- load = new ServerLoad();
- InternalDataSerializer.invokeFromData(load, in);
- location = new ServerLocation();
- InternalDataSerializer.invokeFromData(location, in);
- this.clientIds = DataSerializer.readArrayList(in);
- }
-
- @Override
- public void toData(DataOutput out) throws IOException {
- super.toData(out);
- InternalDataSerializer.invokeToData(load, out);
- InternalDataSerializer.invokeToData(location, out);
- DataSerializer.writeArrayList(this.clientIds, out);
- }
-
- @Override
- protected Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/183ed7a0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/CacheServerLoadMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/CacheServerLoadMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/CacheServerLoadMessage.java
new file mode 100644
index 0000000..e4f63dc
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/CacheServerLoadMessage.java
@@ -0,0 +1,99 @@
+/*=========================================================================
+ * Copyright (c) 2002-2014 Pivotal Software, Inc. All Rights Reserved.
+ * This product is protected by U.S. and international copyright
+ * and intellectual property laws. Pivotal products are covered by
+ * more patents listed at http://www.pivotal.io/patents.
+ *=========================================================================
+ */
+package com.gemstone.gemfire.cache.client.internal;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.cache.server.ServerLoad;
+import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.distributed.internal.SerialDistributionMessage;
+import com.gemstone.gemfire.distributed.internal.ServerLocation;
+import com.gemstone.gemfire.distributed.internal.ServerLocator;
+import com.gemstone.gemfire.internal.InternalDataSerializer;
+
+/**
+ * A message from a server to a locator to update the locator
+ * with new load information from the server.
+ * Also includes the id of any clients whose estimate is no
+ * longer needed on the server-locator.
+ * @author dsmith
+ * @since 5.7
+ *
+ */
+public class CacheServerLoadMessage extends SerialDistributionMessage {
+ protected ServerLoad load;
+ protected ServerLocation location;
+ protected ArrayList clientIds;
+
+ public CacheServerLoadMessage() {
+ super();
+ }
+
+ public CacheServerLoadMessage(ServerLoad load, ServerLocation location,
+ ArrayList clientIds) {
+ super();
+ this.load = load;
+ this.location = location;
+ this.clientIds = clientIds;
+ }
+
+ @Override
+ protected void process(DistributionManager dm) {
+ updateLocalLocators();
+ }
+
+ public void updateLocalLocators() {
+ List locators = Locator.getLocators();
+ for (int i=0; i < locators.size(); i++) {
+ InternalLocator l = (InternalLocator)locators.get(i);
+ ServerLocator serverLocator = l.getServerLocatorAdvisee();
+ if(serverLocator != null) {
+ serverLocator.updateLoad(location, load, this.clientIds);
+ }
+ }
+ }
+
+
+
+ public int getDSFID() {
+ return CACHE_SERVER_LOAD_MESSAGE;
+ }
+
+ @Override
+ public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+ super.fromData(in);
+ load = new ServerLoad();
+ InternalDataSerializer.invokeFromData(load, in);
+ location = new ServerLocation();
+ InternalDataSerializer.invokeFromData(location, in);
+ this.clientIds = DataSerializer.readArrayList(in);
+ }
+
+ @Override
+ public void toData(DataOutput out) throws IOException {
+ super.toData(out);
+ InternalDataSerializer.invokeToData(load, out);
+ InternalDataSerializer.invokeToData(location, out);
+ DataSerializer.writeArrayList(this.clientIds, out);
+ }
+
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/183ed7a0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/internal/LoadMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/internal/LoadMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/internal/LoadMonitor.java
index c516407..129ba2c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/internal/LoadMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/internal/LoadMonitor.java
@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.client.internal.BridgeServerLoadMessage;
+import com.gemstone.gemfire.cache.client.internal.CacheServerLoadMessage;
import com.gemstone.gemfire.cache.server.ServerLoad;
import com.gemstone.gemfire.cache.server.ServerLoadProbe;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
@@ -195,8 +195,8 @@ public class LoadMonitor implements ConnectionListener {
stats.setLoad(load);
if (locators != null) {
- BridgeServerLoadMessage message =
- new BridgeServerLoadMessage(load, location, myClientIds);
+ CacheServerLoadMessage message =
+ new CacheServerLoadMessage(load, location, myClientIds);
message.setRecipients(locators);
MembershipManager mgr = advisor.getDistributionManager().getMembershipManager();
if (mgr == null || !mgr.isBeingSick()) { // test hook
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/183ed7a0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java
index 2181de4..d556ce2 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.admin.internal.PrepareBackupResponse;
import com.gemstone.gemfire.admin.internal.SystemMemberCacheEventProcessor;
import com.gemstone.gemfire.admin.jmx.internal.StatAlertNotification;
import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.client.internal.BridgeServerLoadMessage;
+import com.gemstone.gemfire.cache.client.internal.CacheServerLoadMessage;
import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionRequest;
import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionResponse;
import com.gemstone.gemfire.cache.client.internal.locator.ClientReplacementRequest;
@@ -860,7 +860,7 @@ public final class DSFIDFactory implements DataSerializableFixedID {
registerDSFID(ALERTS_NOTIF_MESSAGE, AlertsNotificationMessage.class);
registerDSFID(FIND_DURABLE_QUEUE, FindDurableQueueMessage.class);
registerDSFID(FIND_DURABLE_QUEUE_REPLY, FindDurableQueueReply.class);
- registerDSFID(BRIDGE_SERVER_LOAD_MESSAGE, BridgeServerLoadMessage.class);
+ registerDSFID(CACHE_SERVER_LOAD_MESSAGE, CacheServerLoadMessage.class);
registerDSFID(CACHE_SERVER_PROFILE, CacheServerProfile.class);
registerDSFID(CONTROLLER_PROFILE, ControllerProfile.class);
registerDSFID(DLOCK_QUERY_MESSAGE,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/183ed7a0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
index 8a4d31e..84f038a 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
@@ -346,7 +346,7 @@ public interface DataSerializableFixedID extends SerializationVersions {
public static final byte CONCURRENT_HASH_MAP = 21;
public static final byte FIND_DURABLE_QUEUE = 22;
public static final byte FIND_DURABLE_QUEUE_REPLY = 23;
- public static final byte BRIDGE_SERVER_LOAD_MESSAGE = 24;
+ public static final byte CACHE_SERVER_LOAD_MESSAGE = 24;
/** A header byte meaning that the next element in the stream is a
* <code>ObjectPartList</code>.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/183ed7a0/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
index e46e70a..1665a3f 100644
--- a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
+++ b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
@@ -34,7 +34,7 @@ com/gemstone/gemfire/cache/SubscriptionAttributes,2
fromData,14,2a2bb9000f0100b80010b50003b1
toData,14,2b2ab40003b4000db9000e0200b1
-com/gemstone/gemfire/cache/client/internal/BridgeServerLoadMessage,2
+com/gemstone/gemfire/cache/client/internal/CacheServerLoadMessage,2
fromData,52,2a2bb7000c2abb000d59b7000eb500022ab400022bb8000f2abb001059b70011b500032ab400032bb8000f2a2bb80012b50004b1
toData,30,2a2bb700132ab400022bb800142ab400032bb800142ab400042bb80015b1