/** * Get the Collection of MPath associated with snapshot id and authzObj * @param authzSnapshotID Snapshot ID * @param authzObj Object name * @return Path mapping for object provided. * @throws Exception */ @VisibleForTesting Set<MPath> getMAuthzPaths(long authzSnapshotID, String authzObj) throws Exception { return tm.executeTransactionWithRetry( pm -> { MAuthzPathsMapping mapping = null; pm.setDetachAllOnCommit(true); // No need to detach objects mapping = getMAuthzPathsMappingCore(pm, authzSnapshotID, authzObj); if(mapping != null) { Set<MPath> paths = mapping.getPathsPersisted(); return paths; } else { return Collections.emptySet(); } }); }