private void updateAllTableConstraints(RawStore rawStore, String catName, String dbName, String tblName) {
      catName = StringUtils.normalizeIdentifier(catName);
      dbName = StringUtils.normalizeIdentifier(dbName);
      tblName = StringUtils.normalizeIdentifier(tblName);
      LOG.debug("CachedStore: updating cached table constraints objects for catalog: {}, database: {}, table: {}", catName,
          dbName, tblName);
      SQLAllTableConstraints constraints = null;
      try {
        Deadline.startTimer("getAllTableConstraints");
        constraints = rawStore.getAllTableConstraints(new AllTableConstraintsRequest(catName, dbName, tblName));
        Deadline.stopTimer();
      } catch (MetaException | NoSuchObjectException e) {
        LOG.info("Updating CachedStore: unable to update table constraints of catalog: " + catName + ", database: " + dbName
            + ", table: " + tblName, e);
      }
      if (constraints != null) {
        sharedCache.refreshAllTableConstraintsInCache(catName, dbName, tblName, constraints);
        LOG.debug("CachedStore: updated cached table constraints objects for catalog: {}, database: {}, table: {}", catName,
            dbName, tblName);
      }
    }
This starts a background thread, which initially populates the SharedCache and later
periodically gets updates from the metastore db

@param conf
@param runOnlyOnce
@param shouldRunPrewarm
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java