public SystemStreamMetadata.SystemStreamPartitionMetadata getMetadata(SystemStreamPartition ssp) {
    maybeRefreshMetadata(ssp);
    CacheEntry cacheEntry = cache.get(ssp);
    /*
     * cacheEntry itself should not be null once the refresh is done, but check anyways to be safe.
     * The metadata inside a non-null cacheEntry might still be null, so this will return null in that case.
     */
    return cacheEntry == null ? null : cacheEntry.getMetadata();
  }
Gets the metadata for an SSP. This will return a cached value if it is fresh enough. Otherwise, it will fetch the
metadata from a source-of-truth.
If the metadata for the SSP needs to be fetched, then this will also prefetch and cache the metadata for any stale
{@link #sspsToPrefetch} that can be included in the same fetch call (e.g. same system).

@param ssp SSP for which to get metadata
@return metadata for the SSP; null if the source-of-truth returned no metadata
@throws RuntimeException if there was an error in fetching metadata
samza-core/src/main/scala/org/apache/samza/system/SSPMetadataCache.java