File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
server/src/main/java/org/elasticsearch/cluster Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,24 +24,28 @@ public final class ProjectState {
2424
2525 private final ClusterState cluster ;
2626 private final ProjectId project ;
27+ private final ProjectMetadata projectMetadata ;
28+ private final RoutingTable routingTable ;
2729
2830 ProjectState (ClusterState clusterState , ProjectId projectId ) {
2931 assert clusterState .metadata ().hasProject (projectId )
3032 : "project-id [" + projectId + "] not found in " + clusterState .metadata ().projects ().keySet ();
3133 this .cluster = clusterState ;
3234 this .project = projectId ;
35+ this .projectMetadata = clusterState .metadata ().getProject (projectId );
36+ this .routingTable = clusterState .routingTable (projectId );
3337 }
3438
3539 public ProjectId projectId () {
3640 return this .project ;
3741 }
3842
3943 public ProjectMetadata metadata () {
40- return cluster (). metadata (). getProject ( projectId ()) ;
44+ return projectMetadata ;
4145 }
4246
4347 public RoutingTable routingTable () {
44- return cluster (). routingTable ( projectId ()) ;
48+ return routingTable ;
4549 }
4650
4751 public ClusterState cluster () {
You can’t perform that action at this time.
0 commit comments