Skip to content

Commit

Permalink
#207: Remove orphan method in NamespaceService
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Arnhold <[email protected]>
  • Loading branch information
jnsrnhld committed Jul 16, 2023
1 parent 353bb45 commit 73870d5
Showing 1 changed file with 1 addition and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import java.util.List;


@Service
@RequiredArgsConstructor
@Slf4j
Expand Down Expand Up @@ -76,23 +77,6 @@ public List<String> getAllOfTenant(String tenantName) throws PulsarApiException
}
}

private NamespaceDetailDto enrichWithNamespaceData(NamespaceDetailDto namespace) throws PulsarApiException {
try {

Namespaces namespaces = pulsarAdmin.namespaces();
namespace.setBundlesData(namespaces.getBundles(namespace.getName()));
namespace.setMessagesTTL(namespaces.getNamespaceMessageTTL(namespace.getName()));
namespace.setRetentionPolicies(namespaces.getRetention(namespace.getName()));
namespace.setTopics(topicService.getAllForNamespace(namespace.getName()));

return namespace;
} catch (PulsarAdminException e) {
throw new PulsarApiException(
"Could not fetch namespace data of namespace '%s'".formatted(namespace.getName()), e
);
}
}

private NamespaceDto enrichWithCardDetails(NamespaceDto namespace) {
namespace.setNumberOfTopics(topicService.getAllForNamespace(namespace.getId()).size());
return namespace;
Expand Down

0 comments on commit 73870d5

Please sign in to comment.