This is an automated email from the ASF dual-hosted git repository.

jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git

commit 0d9e4bded24ebf91a50e5a786dc07af2b416c6d7
Author: Jacob Barrett <jbarr...@pivotal.io>
AuthorDate: Fri Jul 30 21:30:11 2021 -0700

    GEODE-8870: Removes old unused classes.
---
 .../org/apache/geode/internal/DSFIDFactory.java    |   4 -
 .../cache/tier/sockets/ObjectPartList651.java      | 153 ---------------------
 .../tier/sockets/SerializedObjectPartList.java     | 127 -----------------
 .../serialization/DataSerializableFixedID.java     |   9 +-
 4 files changed, 6 insertions(+), 287 deletions(-)

diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java 
b/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
index 504e7d1..a06f25b 100644
--- a/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
+++ b/geode-core/src/main/java/org/apache/geode/internal/DSFIDFactory.java
@@ -373,9 +373,7 @@ import 
org.apache.geode.internal.cache.tier.sockets.ClientUpdateMessageImpl;
 import org.apache.geode.internal.cache.tier.sockets.HAEventWrapper;
 import org.apache.geode.internal.cache.tier.sockets.InterestResultPolicyImpl;
 import org.apache.geode.internal.cache.tier.sockets.ObjectPartList;
-import org.apache.geode.internal.cache.tier.sockets.ObjectPartList651;
 import 
org.apache.geode.internal.cache.tier.sockets.RemoveClientFromDenylistMessage;
-import org.apache.geode.internal.cache.tier.sockets.SerializedObjectPartList;
 import 
org.apache.geode.internal.cache.tier.sockets.ServerInterestRegistrationMessage;
 import org.apache.geode.internal.cache.tier.sockets.VersionedObjectList;
 import org.apache.geode.internal.cache.tx.DistTxEntryEvent;
@@ -858,7 +856,6 @@ public class DSFIDFactory implements 
DataSerializableFixedID {
     serializer.registerDSFID(CLIENT_REPLACEMENT_REQUEST, 
ClientReplacementRequest.class);
     serializer.registerDSFID(OBJECT_PART_LIST, ObjectPartList.class);
     serializer.registerDSFID(VERSIONED_OBJECT_LIST, VersionedObjectList.class);
-    serializer.registerDSFID(OBJECT_PART_LIST66, ObjectPartList651.class);
     serializer.registerDSFID(PUTALL_VERSIONS_LIST, EntryVersionsList.class);
     serializer.registerDSFID(INITIAL_IMAGE_VERSIONED_OBJECT_LIST,
         InitialImageVersionedEntryList.class);
@@ -932,7 +929,6 @@ public class DSFIDFactory implements 
DataSerializableFixedID {
     serializer.registerDSFID(BATCH_DESTROY_MESSAGE, 
BatchDestroyOperation.DestroyMessage.class);
     serializer.registerDSFID(FIND_REMOTE_TX_MESSAGE, 
FindRemoteTXMessage.class);
     serializer.registerDSFID(FIND_REMOTE_TX_REPLY, 
FindRemoteTXMessageReply.class);
-    serializer.registerDSFID(SERIALIZED_OBJECT_PART_LIST, 
SerializedObjectPartList.class);
     serializer.registerDSFID(FLUSH_TO_DISK_REQUEST, FlushToDiskRequest.class);
     serializer.registerDSFID(FLUSH_TO_DISK_RESPONSE, 
FlushToDiskResponse.class);
     serializer.registerDSFID(ENUM_ID, EnumId.class);
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ObjectPartList651.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ObjectPartList651.java
deleted file mode 100644
index c9b27cc..0000000
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/ObjectPartList651.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * 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
- *
- * 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.internal.cache.tier.sockets;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.apache.geode.DataSerializer;
-import org.apache.geode.internal.serialization.DataSerializableFixedID;
-import org.apache.geode.internal.serialization.DeserializationContext;
-import org.apache.geode.internal.serialization.SerializationContext;
-
-/**
- * Adds one more object type which indicates that the key is not present at 
the server.
- *
- * [bruce] THIS CLASS IS OBSOLETE AS OF V7.0. It is replaced with 
VersionedObjectList
- *
- *
- */
-public class ObjectPartList651 extends ObjectPartList {
-
-  public ObjectPartList651() {
-    super();
-  }
-
-  public ObjectPartList651(int maximumchunksize, boolean b) {
-    super(maximumchunksize, b);
-  }
-
-  @Override
-  public void addObjectPartForAbsentKey(Object key, Object value) {
-    addPart(key, value, KEY_NOT_AT_SERVER, null);
-  }
-
-  @Override
-  public void addAll(ObjectPartList other) {
-    if (this.hasKeys) {
-      this.keys.addAll(other.keys);
-    } else if (other.hasKeys) {
-      this.hasKeys = true;
-      this.keys = other.keys;
-    }
-
-    for (int i = 0; i < other.objects.size(); i++) {
-      this.objects.add(other.objects.get(i));
-    }
-
-    if (this.objectTypeArray != null) {
-      byte[] temp = new byte[this.objectTypeArray.length];
-      System.arraycopy(this.objectTypeArray, 0, temp, 0, 
this.objectTypeArray.length);
-      this.objectTypeArray = new byte[this.objects.size()];
-      System.arraycopy(temp, 0, this.objectTypeArray, 0, temp.length);
-      System.arraycopy(other.objectTypeArray, 0, this.objectTypeArray, 
temp.length,
-          other.objectTypeArray.length);
-    } else {
-      this.objectTypeArray = new byte[this.objects.size()];
-      System.arraycopy(other.objectTypeArray, 0, this.objectTypeArray, 0,
-          other.objectTypeArray.length);
-    }
-  }
-
-  public boolean isKeyNotOnServer(int index) {
-    return (this.objectTypeArray[index] == KEY_NOT_AT_SERVER);
-  }
-
-  @Override
-  public void toData(DataOutput out,
-      SerializationContext context) throws IOException {
-    out.writeBoolean(this.hasKeys);
-    if (this.objectTypeArray != null) {
-      int numObjects = this.objects.size();
-      out.writeInt(numObjects);
-      for (int index = 0; index < numObjects; ++index) {
-        Object value = this.objects.get(index);
-        byte objectType = this.objectTypeArray[index];
-        if (this.hasKeys) {
-          context.getSerializer().writeObject(this.keys.get(index), out);
-        }
-        if ((objectType == KEY_NOT_AT_SERVER)) {
-          out.writeByte(KEY_NOT_AT_SERVER);
-        } else if (objectType == EXCEPTION) {
-          out.writeByte(EXCEPTION);
-        } else {
-          out.writeByte(OBJECT);
-        }
-
-        if (objectType == OBJECT && value instanceof byte[]) {
-          out.write((byte[]) value);
-        } else if (objectType == EXCEPTION) {
-          // write exception as byte array so native clients can skip it
-          DataSerializer.writeByteArray(CacheServerHelper.serialize(value), 
out);
-          // write the exception string for native clients
-          DataSerializer.writeString(value.toString(), out);
-        } else {
-          context.getSerializer().writeObject(value, out);
-        }
-      }
-    } else {
-      out.writeInt(0);
-    }
-  }
-
-  @Override
-  public void fromData(DataInput in,
-      DeserializationContext context) throws IOException, 
ClassNotFoundException {
-    boolean keysPresent = in.readBoolean();
-    if (keysPresent) {
-      this.keys = new ArrayList();
-    }
-    this.hasKeys = keysPresent;
-    int numObjects = in.readInt();
-    this.objectTypeArray = new byte[numObjects];
-    if (numObjects > 0) {
-      for (int index = 0; index < numObjects; ++index) {
-        if (keysPresent) {
-          Object key = context.getDeserializer().readObject(in);
-          this.keys.add(key);
-        }
-        byte objectType = in.readByte();
-        this.objectTypeArray[index] = objectType;
-        Object value;
-        if (objectType == EXCEPTION) {
-          byte[] exBytes = DataSerializer.readByteArray(in);
-          value = CacheServerHelper.deserialize(exBytes);
-          // ignore the exception string meant for native clients
-          DataSerializer.readString(in);
-        } else {
-          value = context.getDeserializer().readObject(in);
-        }
-        this.objects.add(value);
-      }
-    }
-  }
-
-  @Override
-  public int getDSFID() {
-    return DataSerializableFixedID.OBJECT_PART_LIST66;
-  }
-}
diff --git 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/SerializedObjectPartList.java
 
b/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/SerializedObjectPartList.java
deleted file mode 100644
index 3f5d1cd..0000000
--- 
a/geode-core/src/main/java/org/apache/geode/internal/cache/tier/sockets/SerializedObjectPartList.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * 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
- *
- * 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.internal.cache.tier.sockets;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-
-import org.apache.geode.DataSerializer;
-import org.apache.geode.internal.serialization.DataSerializableFixedID;
-import org.apache.geode.internal.serialization.DeserializationContext;
-import org.apache.geode.internal.serialization.SerializationContext;
-
-/**
- * A variant of the ObjectPartList which deserializes the values as byte 
arrays of serialized
- * objects, rather than as deserialized objects.
- *
- * [bruce] THIS CLASS IS OBSOLETE AS OF V7.0. It is replaced with 
VersionedObjectList
- *
- */
-public class SerializedObjectPartList extends ObjectPartList651 {
-
-  public SerializedObjectPartList() {
-    super();
-  }
-
-  public SerializedObjectPartList(int maximumchunksize, boolean hasKeys) {
-    super(maximumchunksize, hasKeys);
-  }
-
-  @Override
-  public void toData(DataOutput out,
-      SerializationContext context) throws IOException {
-    out.writeBoolean(this.hasKeys);
-    if (this.objectTypeArray != null) {
-      int numObjects = this.objects.size();
-      out.writeInt(numObjects);
-      for (int index = 0; index < numObjects; ++index) {
-        Object value = this.objects.get(index);
-        byte objectType = this.objectTypeArray[index];
-        if (this.hasKeys) {
-          context.getSerializer().writeObject(this.keys.get(index), out);
-        }
-        if ((objectType == KEY_NOT_AT_SERVER)) {
-          out.writeByte(KEY_NOT_AT_SERVER);
-        } else if (objectType == EXCEPTION) {
-          out.writeByte(EXCEPTION);
-        } else if (objectType == BYTES) {
-          out.writeByte(BYTES);
-        } else {
-          out.writeByte(OBJECT);
-        }
-
-        if (objectType == EXCEPTION) {
-          // write exception as byte array so native clients can skip it
-          DataSerializer.writeByteArray(CacheServerHelper.serialize(value), 
out);
-          // write the exception string for native clients
-          DataSerializer.writeString(value.toString(), out);
-        } else if (value instanceof byte[]) {
-          DataSerializer.writeByteArray((byte[]) value, out);
-        } else {
-          DataSerializer.writeObjectAsByteArray(value, out);
-        }
-      }
-    } else {
-      out.writeInt(0);
-    }
-  }
-
-  @Override
-  public void fromData(DataInput in,
-      DeserializationContext context) throws IOException, 
ClassNotFoundException {
-    boolean keysPresent = in.readBoolean();
-    if (keysPresent) {
-      this.keys = new ArrayList();
-    }
-    this.hasKeys = keysPresent;
-    int numObjects = in.readInt();
-    this.objectTypeArray = new byte[numObjects];
-    if (numObjects > 0) {
-      for (int index = 0; index < numObjects; ++index) {
-        if (keysPresent) {
-          Object key = context.getDeserializer().readObject(in);
-          this.keys.add(key);
-        }
-        byte objectType = in.readByte();
-        this.objectTypeArray[index] = objectType;
-        Object value;
-        if (objectType == EXCEPTION) {
-          byte[] exBytes = DataSerializer.readByteArray(in);
-          value = CacheServerHelper.deserialize(exBytes);
-          // ignore the exception string meant for native clients
-          DataSerializer.readString(in);
-        } else {
-          value = DataSerializer.readByteArray(in);
-        }
-        this.objects.add(value);
-      }
-    }
-  }
-
-  public boolean isBytes(int index) {
-    return this.objectTypeArray[index] == BYTES;
-  }
-
-  public boolean isException(int index) {
-    return this.objectTypeArray[index] == EXCEPTION;
-  }
-
-  @Override
-  public int getDSFID() {
-    return DataSerializableFixedID.SERIALIZED_OBJECT_PART_LIST;
-  }
-}
diff --git 
a/geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedID.java
 
b/geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedID.java
index a39a406..dfdf15e 100644
--- 
a/geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedID.java
+++ 
b/geode-serialization/src/main/java/org/apache/geode/internal/serialization/DataSerializableFixedID.java
@@ -87,7 +87,8 @@ public interface DataSerializableFixedID extends 
SerializationVersions, BasicSer
 
   short SNAPPY_COMPRESSED_CACHED_DESERIALIZABLE = -140;
 
-  short GATEWAY_EVENT_IMPL = -136;
+  // -136 unused
+
   short GATEWAY_SENDER_EVENT_CALLBACK_ARGUMENT = -135;
   short GATEWAY_SENDER_EVENT_IMPL = -134;
 
@@ -596,12 +597,14 @@ public interface DataSerializableFixedID extends 
SerializationVersions, BasicSer
   short COMPACT_RESPONSE = 2119;
   short FLOW_CONTROL_PERMIT_MESSAGE = 2120;
 
-  short OBJECT_PART_LIST66 = 2121;
+  // 2121 unused
+
   short LINKED_RESULTSET = 2122;
   short LINKED_STRUCTSET = 2123;
   short PR_ALL_BUCKET_PROFILES_UPDATE_MESSAGE = 2124;
 
-  short SERIALIZED_OBJECT_PART_LIST = 2125;
+  // 2125 unused
+
   short FLUSH_TO_DISK_REQUEST = 2126;
   short FLUSH_TO_DISK_RESPONSE = 2127;
 

Reply via email to