Trait mz_sql::catalog::CatalogCluster
source · pub trait CatalogCluster<'a> {
// Required methods
fn name(&self) -> &str;
fn id(&self) -> ClusterId;
fn bound_objects(&self) -> &BTreeSet<CatalogItemId>;
fn replica_ids(&self) -> &BTreeMap<String, ReplicaId>;
fn replicas(&self) -> Vec<&dyn CatalogClusterReplica<'_>>;
fn replica(&self, id: ReplicaId) -> &dyn CatalogClusterReplica<'_>;
fn owner_id(&self) -> RoleId;
fn privileges(&self) -> &PrivilegeMap;
fn is_managed(&self) -> bool;
fn managed_size(&self) -> Option<&str>;
fn schedule(&self) -> Option<&ClusterSchedule>;
fn try_to_plan(&self) -> Result<CreateClusterPlan, PlanError>;
}
Expand description
A cluster in a SessionCatalog
.
Required Methods§
sourcefn bound_objects(&self) -> &BTreeSet<CatalogItemId>
fn bound_objects(&self) -> &BTreeSet<CatalogItemId>
Returns the objects that are bound to this cluster.
sourcefn replica_ids(&self) -> &BTreeMap<String, ReplicaId>
fn replica_ids(&self) -> &BTreeMap<String, ReplicaId>
Returns the replicas of the cluster as a map from replica name to replica ID.
sourcefn replicas(&self) -> Vec<&dyn CatalogClusterReplica<'_>>
fn replicas(&self) -> Vec<&dyn CatalogClusterReplica<'_>>
Returns the replicas of the cluster.
sourcefn replica(&self, id: ReplicaId) -> &dyn CatalogClusterReplica<'_>
fn replica(&self, id: ReplicaId) -> &dyn CatalogClusterReplica<'_>
Returns the replica belonging to the cluster with replica ID id
.
sourcefn privileges(&self) -> &PrivilegeMap
fn privileges(&self) -> &PrivilegeMap
Returns the privileges associated with the cluster.
sourcefn is_managed(&self) -> bool
fn is_managed(&self) -> bool
Returns true if this cluster is a managed cluster.
sourcefn managed_size(&self) -> Option<&str>
fn managed_size(&self) -> Option<&str>
Returns the size of the cluster, if the cluster is a managed cluster.
sourcefn schedule(&self) -> Option<&ClusterSchedule>
fn schedule(&self) -> Option<&ClusterSchedule>
Returns the schedule of the cluster, if the cluster is a managed cluster.
sourcefn try_to_plan(&self) -> Result<CreateClusterPlan, PlanError>
fn try_to_plan(&self) -> Result<CreateClusterPlan, PlanError>
Try to convert this cluster into a CreateClusterPlan
.