/** * Lists all that has same first id parts for default COLUMN * * @param id prefix row key * @param typeOfT the type of the result * @return a list of the deserialized value of the result */ public <T> List<T> list(MDSKey id, Type typeOfT) { return list(id, typeOfT, Integer.MAX_VALUE); }
/** * Lists all that has same first id parts for default COLUMN, with a limit * * @param id prefix row key * @param typeOfT the type of the result * @param limit limit number of result * @return a list of the deserialized value of the result */ public <T> List<T> list(MDSKey id, Type typeOfT, int limit) { return list(id, null, typeOfT, limit, x -> true); }
/** * Lists all that has same first id parts for default COLUMN * * @param id prefix row key * @param typeOfT the type of the result * @return a list of the deserialized value of the result */ public <T> List<T> list(MDSKey id, Type typeOfT) { return list(id, typeOfT, Integer.MAX_VALUE); }
/** * Lists all that has same first id parts for default COLUMN, with a limit * * @param id prefix row key * @param typeOfT the type of the result * @param limit limit number of result * @return a list of the deserialized value of the result */ public <T> List<T> list(MDSKey id, Type typeOfT, int limit) { return list(id, null, typeOfT, limit, x -> true); }
/** * Get the profile information in the given namespace * * @param namespaceId the id of the profile to look up * @param includeSystem whether to include profiles in system namespace * @return the list of profiles which is in this namespace */ public List<Profile> getProfiles(NamespaceId namespaceId, boolean includeSystem) { List<Profile> profiles = new ArrayList<>(table.list(getProfileRowKeyPrefix(namespaceId), Profile.class)); if (includeSystem && !namespaceId.equals(NamespaceId.SYSTEM)) { profiles.addAll(table.list(getProfileRowKeyPrefix(NamespaceId.SYSTEM), Profile.class)); } return Collections.unmodifiableList(profiles); }
/** * Get the profile information in the given namespace * * @param namespaceId the id of the profile to look up * @param includeSystem whether to include profiles in system namespace * @return the list of profiles which is in this namespace */ public List<Profile> getProfiles(NamespaceId namespaceId, boolean includeSystem) { List<Profile> profiles = new ArrayList<>(table.list(getProfileRowKeyPrefix(namespaceId), Profile.class)); if (includeSystem && !namespaceId.equals(NamespaceId.SYSTEM)) { profiles.addAll(table.list(getProfileRowKeyPrefix(NamespaceId.SYSTEM), Profile.class)); } return Collections.unmodifiableList(profiles); }
/** * Get assignments with the profile. * * @param profileId the profile id * @return the set of entities that the profile is assigned to * @throws NotFoundException if the profile is not found */ public Set<EntityId> getProfileAssignments(ProfileId profileId) throws NotFoundException { Profile profile = table.get(getProfileRowKey(profileId), Profile.class); if (profile == null) { throw new NotFoundException(profileId); } return Collections.unmodifiableSet(new HashSet<>(table.list(getEntityIndexRowKeyPrefix(profileId), EntityId.class))); }
/** * Get assignments with the profile. * * @param profileId the profile id * @return the set of entities that the profile is assigned to * @throws NotFoundException if the profile is not found */ public Set<EntityId> getProfileAssignments(ProfileId profileId) throws NotFoundException { Profile profile = table.get(getProfileRowKey(profileId), Profile.class); if (profile == null) { throw new NotFoundException(profileId); } return Collections.unmodifiableSet(new HashSet<>(table.list(getEntityIndexRowKeyPrefix(profileId), EntityId.class))); }
public List<ProvisioningTaskInfo> listTaskInfo() { return table.list(new MDSKey.Builder().add(STATE_PREFIX).build(), ProvisioningTaskInfo.class); }
public List<ProvisioningTaskInfo> listTaskInfo() { return table.list(new MDSKey.Builder().add(STATE_PREFIX).build(), ProvisioningTaskInfo.class); }
@Override public List<StreamSpecification> call(DatasetContext context) throws Exception { return getMetadataStore(context).list(new MDSKey.Builder().add(TYPE_STREAM, namespaceId.getEntityName()).build(), StreamSpecification.class); } }, Exception.class);