docs: protected HashtableEntry readEntry2(long location,
                                          long next,
                                          int hash,
                                          long previous,
                                          int retrieveMode,
                                          boolean checkExpired,
                                          int tableid,
                                          Object matchKey,
                                          EvictionTableEntry matchEVT)
                      throws IOException,
                      ClassNotFoundException {
          long last_modified = 0;
          long last_referenced = 0;
          long first_created = 0;
          long expiration = -1;
          long validatorExpiration = -1;
          long tempData = -1;
          int dataSize = -1;
  
          int keySize = -1;
          Object key = null;
  
          int valueSize = -1;
          int bytes = 0;
          Object value = null;
  
          int cacheValueSize = 0;
          int cacheValueHashcode = 0; // LI4337-17
          byte[] serializedCacheValue = null;
          boolean isAliasId = false;
          boolean isValidHashcodeForValue = true;
  
          HashtableEntry htEntry = htoddc.getFromHashtableEntryPool();
          last_modified = headerin.readLong(); // old format: last modified
                                               // new format: VET 
          //
          // NOTE: last_referenced is no longer being maintained! 
          // we use this field for H-word: unused; L-word field for cache value hashcode
          //        
          last_referenced = headerin.readLong(); // old format: last referenced;
                                                 // new format: unused (int)
                                                 //             hashcode for cache value
          if (last_modified == last_referenced) { // LI4337-17
              isValidHashcodeForValue = false;
              cacheValueHashcode = 0;
              validatorExpiration = -1;
          } else {
              cacheValueHashcode = (int) (last_referenced & HTENTRY_HASHCODE_MASK);
              validatorExpiration = last_modified;
          }
  
          first_created = headerin.readLong(); // time obj first created
          expiration = headerin.readLong(); // expiration (RET)
          tempData = headerin.readLong(); // old format is grace (-1 means not used;  0 means alias)
                                          // new format: magic number, version, flag & data size
          if (tempData != -1) {
              if (tempData == 0) {
                  isAliasId = true;
              } else {
                  dataSize = (int) (tempData & HTENTRY_DATA_SIZE_MASK);
                  isAliasId = (tempData & HTENTRY_ALIAS_ID) > 0 ? true : false;
                  //long hteMagic = tempData & HTENTRY_MAGIC_MASK;
                  //if (hteMagic != HTENTRY_MAGIC) {
                  //    System.out.println("*** magic not compare received=" + hteMagic + " expected=" + HTENTRY_MAGIC);
                  //}
                  //long hteVersion = tempData & HTENTRY_VERSION_MASK;
                  //if (hteVersion != HTENTRY_VERSION) {
                  //    System.out.println("*** magic not compare received=" + hteVersion + " expected=" + HTENTRY_VERSION);
                  //}
                  //long hteFlags = tempData & HTENTRY_FLAGS_MASK;
                  //if (hteFlags != 0) {
                  //    System.out.println("*** magic not compare received=" + hteFlags + " expected=0");
                  //}
              }
          }
  
          // if matchEVT is valid, compare the expiration time and size key. If not match, the code returns NULL.
          if (matchEVT != null) { //493877
              long expTime = expiration;
              if (expiration <= 0)
                  expTime = Long.MAX_VALUE;
              if (expTime != matchEVT.expirationTime || dataSize != matchEVT.size) {
                  return null;
              }
          }
  
          keySize = headerin.readInt(); // length of serialized key
  
          if ((keybuf == null) || (keybuf.length < keySize)) { // insure desrializion buffer is ok
              keybuf = new byte[keySize];
          }
          filemgr.read(keybuf, 0, keySize); // read key from disk
  
          deserializeTimer.reset();
  
          key = SerializationUtility.deserialize(Arrays.copyOf(keybuf, keySize), htoddc.cacheName); // deserialize the key
          deserialize_time += deserializeTimer.elapsed();
          bytes_deserialized += keySize;
  
          // if matchKey is valid, compare the key whether it matches or not. If not match, the code returns NULL.
          if (matchKey != null && key != null && !key.equals(matchKey)) { //493877
              return null;
          }
  
          if (checkExpired && expiration > 0) {
              if (System.currentTimeMillis() - expiration >= 0) {
                  retrieveMode = RETRIEVE_KEY;
              }
          }
  
          if (retrieveMode == RETRIEVE_ALL || retrieveMode == RETRIEVE_KEY_VALUE) { // both key and data requested?
              bytes = filemgr.readInt(); // read byte flag
              valueSize = filemgr.readInt(); // read data length
              if (valueSize != -1) { // has data?
                  value = readDataField(bytes, valueSize); // read data if byte flag 1 => don't deserialize on data; if byte flag = 0 => deserialize the data
              }
              if (this.bHasCacheValue && dataSize > 0) {
                  cacheValueSize = dataSize - keySize - valueSize;
              }
          }
  
          if (this.bHasCacheValue && !isAliasId && dataSize > 0 && retrieveMode == RETRIEVE_ALL) {
              cacheValueSize = filemgr.readInt(); //read cacheValue length  
              if (cacheValueSize != -1) { // has cacheValue?
                  serializedCacheValue = (byte[]) readDataField(1, cacheValueSize); // passing "1" ==> don't deserialize the cacheValue
              }
          }
  
          //if (this.bHasCacheValue) {
          //    traceDebug("readEntry2()", "cacheName=" + this.htoddc.cacheName + " key=" + key + " dataSize=" + dataSize + " valueSize=" + valueSize + " cacheValueSize=" + cacheValueSize + " expiration=" + expiration);
          //}
  
          //
          // Build the entry
          //
          htEntry.copy(location, first_created, key, value, next, previous,
                       header.tablesize(tableid), tableid, valueSize,
                       expiration, validatorExpiration, dataSize,
                       serializedCacheValue, cacheValueSize, cacheValueHashcode,
                       isAliasId, isValidHashcodeForValue); // LI4337-17
          return htEntry;
      }