docs: public int writeCacheEntry(CacheEntry ce) {
  
          final String methodName = "writeCacheEntry()";
          int returnCode = NO_EXCEPTION;
          Exception diskException = null;
          this.invalidationBuffer.remove(ce.id);
          byte[] serializedData = null; // retrieve byte array directly (avoid copy)
          int serializedDataLength = -1;
          try {
              ce.skipValueSerialized = true;
              serializedData = SerializationUtility.serialize(ce);
              serializedDataLength = serializedData.length;
          } catch (Exception ex) {
              returnCode = SERIALIZATION_EXCEPTION;
              com.ibm.ws.ffdc.FFDCFilter.processException(ex, "com.ibm.ws.cache.HTODDynacache.writeCacheEntry", "1174", this);
              if (tc.isDebugEnabled())
                  Tr.debug(tc, methodName, "cacheName=" + this.cacheName + "\nException: " + ExceptionUtility.getStackTrace(ex));
              return returnCode;
          } finally {
              ce.skipValueSerialized = false;
          }
  
          try {
              rwLock.writeLock().lock();
              int dataSize = HashtableOnDisk.HTENTRY_OVERHEAD_SIZE + ce.serializedId.length + serializedDataLength + ce.serializedValue.length;
              if (dataSize % 512 != 0) { // size adjustment for 512 blocks
                  dataSize = (dataSize / 512 + 1) * 512;
              }
              //if (this.testException) {
              //    throw new FileManagerException("*** Generate filemanager exception");
              //}
              int oldEntrySize = 0; // initialize the oldEntry size to 0
              HashtableEntry htEntry = null;
              if (ce.valueHashcode == 0 && null != ce.value) {
                  ce.valueHashcode = ce.value.hashCode();
              }
              if (ce.timeLimit > 0) {
                  htEntry = object_cache.put(ce.id, serializedData, serializedDataLength, ce.expirationTime, ce.validatorExpirationTime, ce.serializedId, ce.serializedValue,
                                             ce.valueHashcode, !HashtableOnDisk.ALIAS_ID); // LI4337-17  // put into HTOD
              } else {
                  htEntry = object_cache.put(ce.id, serializedData, serializedDataLength, -1, ce.validatorExpirationTime, ce.serializedId, ce.serializedValue, ce.valueHashcode,
                                             !HashtableOnDisk.ALIAS_ID); // LI4337-17  // put into HTOD
              }
              //delete old entry from eviction table or insert into eviction table only if eviction policy is set
              if (this.cod.evictionPolicy != CacheConfig.EVICTION_NONE) {
                  boolean bInsertEntry = true;
                  if (htEntry != null) {
                      // check whether EvictionTable's attributes match or not
                      if ((ce.getId()).hashCode() == (htEntry.getKey()).hashCode() &&
                          ce.expirationTime == htEntry.expirationTime() &&
                          dataSize == htEntry.size()) {
                          // old entry exists and eviction's attributes match
                          // skip inserting the entry into EvictionTable because it already exists in EvictionTable
                          bInsertEntry = false;
                      } else {
                          // old entry exists but eviction's attributes do not match 
                          // then delete the entry from EvictionTable
                          synchronized (evictionTableMonitor) {
                              long expTime = htEntry.expirationTime();
                              if (expTime <= 0)
                                  expTime = Long.MAX_VALUE;
                              EvictionTableEntry evt = EvictionTable.findAndRemove(expTime, (htEntry.getKey()).hashCode(), htEntry.size());
                              if (evt != null) {
                                  if (tc.isDebugEnabled())
                                      Tr.debug(tc, "writeCacheEntry()", " **deleting** id=" + ce.id + " hc=" + evt.hashcode + " expirationTime=" + evt.expirationTime + " size="
                                                                        + evt.size);
                                  evictionEntryPool.add(evt); // return evt to the pool
                              }
                          }
                      }
                  }
                  // if bInsertEntry boolean is true, insert the entry into EvictionTable. Else skip inserting.
                  if (bInsertEntry == true) {
                      EvictionTableEntry evt = (EvictionTableEntry) evictionEntryPool.remove();
                      evt.hashcode = (ce.getId()).hashCode();
                      evt.expirationTime = ce.expirationTime;
                      if (evt.expirationTime <= 0)
                          evt.expirationTime = Long.MAX_VALUE;
                      evt.size = dataSize;
                      evt.id = ce.id; // use it for debug
                      synchronized (evictionTableMonitor) {
                          EvictionTable.insert(evt);
                      }
                      if (tc.isDebugEnabled())
                          Tr.debug(tc, "WriteCacheEntry()", "**adding** id=" + ce.id + " hc=" + evt.hashcode + " expirationTime=" + evt.expirationTime + " size=" + evt.size);
                  }
              }
              // if htEntry is not null, it means the entry is overwritten
              if (htEntry != null) {
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, methodName, "cacheName=" + this.cacheName + " overwritten with id=" + ce.id);
                  returnCode = NO_EXCEPTION_ENTRY_OVERWRITTEN;
                  oldEntrySize = htEntry.size();
                  returnToHashtableEntryPool(htEntry);
              }
              if (this.cod.enableCacheSizeInBytes) {
                  this.cod.currentCacheSizeInBytes = this.cod.currentCacheSizeInBytes + dataSize - oldEntrySize;
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, "WriteCacheEntry()", "**** id=" + ce.id + " size=" + dataSize + " currentCacheSizeInBytes" + this.cod.currentCacheSizeInBytes + " overhead="
                                                        + HashtableOnDisk.HTENTRY_OVERHEAD_SIZE + " idSize=" + ce.serializedId.length + " ceSize=" + serializedDataLength
                                                        + " valueSize=" + ce.serializedValue.length);
              }
              if (tc.isDebugEnabled())
                  Tr.debug(tc, methodName, "cacheName=" + this.cacheName + " cacheSizeInBytes" + this.cod.currentCacheSizeInBytes + " newSize=" + dataSize + " oldSize="
                                           + oldEntrySize + " id=" + ce.id + " enable=" + this.cod.enableCacheSizeInBytes);
              this.cache.getCacheStatisticsListener().writeEntryToDisk(ce.id, dataSize);
              for (int i = 0; i < ce.aliasList.length; i++) {
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, methodName, "cacheName=" + this.cacheName + " adding alias with id=" + ce.id + " alias=" + ce.aliasList[i]);
                  // alias id has no expiration time
                  object_cache.put(ce.aliasList[i], ce.getIdObject(), -1, -1, -1, null, null, 0, HashtableOnDisk.ALIAS_ID);
                  this.invalidationBuffer.remove(ce.aliasList[i], HTODInvalidationBuffer.EXPLICIT_BUFFER);
              }
          } catch (FileManagerException ex) {
              this.diskCacheException = ex;
              diskException = ex;
              returnCode = DISK_EXCEPTION;
          } catch (HashtableOnDiskException ex) {
              this.diskCacheException = ex;
              diskException = ex;
              returnCode = DISK_EXCEPTION;
          } catch (IOException ex) {
              diskException = ex;
              if (ex.getMessage().equals(DISK_CACHE_IN_GB_OVER_LIMIT_MSG)) {
                  returnCode = DISK_SIZE_OVER_LIMIT_EXCEPTION;
              } else {
                  this.diskCacheException = ex;
                  returnCode = DISK_EXCEPTION;
              }
          } catch (Exception ex) {
              returnCode = OTHER_EXCEPTION;
              diskException = ex;
          } finally {
              rwLock.writeLock().unlock();
              if (returnCode != NO_EXCEPTION && returnCode != NO_EXCEPTION_ENTRY_OVERWRITTEN) {
                  if (tc.isDebugEnabled())
                      Tr.debug(tc, methodName, "cacheName=" + this.cacheName + "\n Exception: " + ExceptionUtility.getStackTrace(diskException));
              }
              if (returnCode == DISK_EXCEPTION || returnCode == OTHER_EXCEPTION) {
                  com.ibm.ws.ffdc.FFDCFilter.processException(diskException, "com.ibm.ws.cache.HTODDynacache.writeCacheEntry", "1239", this);
              }
          }
  
          return returnCode;
      }