docs: @Override
      public synchronized boolean prepareForSerialization() {
  
          // PK29388 Get Concurrent Modification Exception if method is not synchronized
          // Some one else might be iterating over this object when we are serializing it
  
          boolean success = true;
          boolean serialized = false; //used to determine if any serialization took place
          String exceptionMessage = null;
          long oldSize = 0, newSize = 0;
          if (cacheEntryPool != null) {
              if (cacheEntryPool.cache.isCacheSizeInMBEnabled()) {
                  oldSize = getObjectSize();
              }
          }
  
          if (value != null) {
              try {
                  serializedValue = SerializationUtility.serialize((Serializable) value);
                  if (useByteBuffer) {
                      if (this.value instanceof DistributedNioMapObject) {
                          ((DistributedNioMapObject) this.value).release();
                      }
                  }
                  value = null;
                  serialized = true;
              } catch (Exception e) {
                  exceptionMessage = e.toString();
                  // com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.cache.CacheEntry.prepareForSerialization", "206", this);
              }
              if (value != null) {
                  Tr.error(tc, "DYNA0052E", new Object[] { id, value.getClass().getName(), "cache-value", exceptionMessage }); // LI4337-17
                  success = false;
              }
          }
  
          if ((serializedId == null) && success) {
              try {
                  serializedId = SerializationUtility.serialize((Serializable) id);
                  serialized = true;
              } catch (Exception e) {
                  exceptionMessage = e.toString();
                  // com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.cache.CacheEntry.prepareForSerialization", "244", this);
              }
              if (serializedId == null) {
                  Tr.error(tc, "DYNA0052E", new Object[] { id, (id == null ? "null" : id.getClass().getName()), "cache-id", exceptionMessage }); // LI4337-17
                  success = false;
              }
          }
  
          if ((_serializedDataIds == null) && _dataIds.length > 0 && success) {
              _serializedDataIds = new Object[_dataIds.length];
              int i = 0;
              try {
                  for (i = 0; i < _dataIds.length; i++) {
                      _serializedDataIds[i] = SerializationUtility.serialize((Serializable) _dataIds[i]);
                  }
                  serialized = true;
              } catch (Exception e) {
                  exceptionMessage = e.toString();
                  // com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ws.cache.CacheEntry.prepareForSerialization", "264", this);
              }
              if (exceptionMessage != null) {
                  if (_dataIds[i] != null) {
                      Tr.error(tc, "DYNA0052E", new Object[] { id, (_dataIds[i] == null ? "null" : _dataIds[i].getClass().getName()), "dep-id", exceptionMessage }); // LI4337-17
                  }
                  success = false;
                  _serializedDataIds = null;
              }
          }
  
          if ((serializedAliasList == null) && aliasList.length > 0 && success) { //CCC-O
              serializedAliasList = new Object[aliasList.length];
              int i = 0;
              try {
                  for (i = 0; i < aliasList.length; i++) {
                      serializedAliasList[i] = SerializationUtility.serialize((Serializable) aliasList[i]);
                  }
                  serialized = true;
              } catch (Exception e) {
                  exceptionMessage = e.toString();
              }
              if (exceptionMessage != null) {
                  if (aliasList[i] != null) {
                      Tr.error(tc, "DYNA0052E", new Object[] { id, (aliasList[i] == null ? "null" : aliasList[i].getClass().getName()), "alias-id", exceptionMessage }); // LI4337-17
                  }
                  success = false;
                  serializedAliasList = null;
              }
          }
  
          if (userMetaData != null && success) {
              try {
                  serializedUserMetaData = SerializationUtility.serialize((Serializable) userMetaData);
                  userMetaData = null;
                  serialized = true;
              } catch (Exception e) {
                  exceptionMessage = e.toString();
              }
              if (userMetaData != null) {
                  Tr.error(tc, "DYNA0052E", new Object[] { id, userMetaData.getClass().getName(), "metadata", exceptionMessage }); // LI4337-17
                  success = false;
              }
          }
  
          //adjusting the size is necessary here because after serialization the size of the CE changes in memory
          //therefore it becomes necessary to recompute the size and adjust the difference in the overall cache size in MB.		
          if (success && serialized && cacheEntryPool != null) {
              if (cacheEntryPool.cache.isCacheSizeInMBEnabled()) {
                  newSize = getObjectSize();
                  if (oldSize != -1 && newSize != -1) {
                      cacheEntryPool.cache.increaseCacheSizeInBytes(newSize - oldSize, "PREPARE_SER");
                  } else {
                      cacheEntryPool.cache.disableCacheSizeInMB();
                  }
              }
          }
  
          return success;
      }