switch (ctx.manager) { case REPOSITORY: count = cacheRepositoryService.countContainers(type, query, options, result); break; case WORKFLOW: count = workflowManager.countContainers(type, query, options, result); break; default: throw new IllegalStateException();