public synchronized ShareSession remove(ShareSessionKey key) {
        ShareSession session = get(key);
        if (session != null)
            return remove(session);
        return null;
    }
Get the number of entries currently in the share session cache.
server/src/main/java/org/apache/kafka/server/share/ShareSessionCache.java