code: public int writeDependency(Object id,
                                 ValueSet valueSet) {
          final String methodName = "writeDependency()";
          int rc = NO_EXCEPTION;
          if (valueSet.size() == 0) {
              if (tc.isDebugEnabled())
                  Tr.debug(tc, methodName, "cacheName=" + this.cacheName + " valueSet=0");
          }
          if (!this.disableDependencyId) {
              if (delayOffload) {
                  ValueSet vs = auxDataDependencyTable.getEntries(id);
                  if (vs == null) {
                      if (valueSet.size() <= auxDataDependencyTable.delayOffloadEntriesLimit) {
                          Result result = writeValueSetEntry(DEP_ID_DATA, id, null, valueSet, !ADD_IF_NEW);
                          rc = result.returnCode;
                          boolean bComplete = result.bComplete;
                          returnToResultPool(result);
                          if (rc != DISK_EXCEPTION && !bComplete) {
                              rc = auxDataDependencyTable.add(id, valueSet);
                          }
                      } else {
                          rc = writeValueSet(DEP_ID_DATA, id, valueSet, !ALL); // valueSet may be empty after writeValueSet
                          this.cache.getCacheStatisticsListener().depIdsOffloadedToDisk(id);
                      }
                  } else {
                      vs.union(valueSet);
                      if (vs.size() > auxDataDependencyTable.delayOffloadEntriesLimit) {
                          auxDataDependencyTable.removeDependency(id);
                          rc = writeValueSet(DEP_ID_DATA, id, vs, ALL); // valueSet may be empty after writeValueSet
                          if (rc != NO_EXCEPTION) {
                              valueSet.clear();
                              valueSet.addAll(vs);
                          }
                          this.cache.getCacheStatisticsListener().depIdsOffloadedToDisk(id);
                      }
                  }
              } else {
                  rc = writeValueSet(DEP_ID_DATA, id, valueSet, !ALL); // valueSet may be empty after writeValueSet
              }
          }
          return rc;
      }
docs: ***********************************************************************
  writeDependency()
  This creates or updates specified dependency Ids with new set of entries.
  ***********************************************************************