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<GlobalId>;
    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>;
}
Expand description

A cluster in a SessionCatalog.

Required Methods§

source

fn name(&self) -> &str

Returns a fully-specified name of the cluster.

source

fn id(&self) -> ClusterId

Returns a stable ID for the cluster.

source

fn bound_objects(&self) -> &BTreeSet<GlobalId>

Returns the objects that are bound to this cluster.

source

fn replica_ids(&self) -> &BTreeMap<String, ReplicaId>

Returns the replicas of the cluster as a map from replica name to replica ID.

source

fn replicas(&self) -> Vec<&dyn CatalogClusterReplica<'_>>

Returns the replicas of the cluster.

source

fn replica(&self, id: ReplicaId) -> &dyn CatalogClusterReplica<'_>

Returns the replica belonging to the cluster with replica ID id.

source

fn owner_id(&self) -> RoleId

Returns the ID of the owning role.

source

fn privileges(&self) -> &PrivilegeMap

Returns the privileges associated with the cluster.

source

fn is_managed(&self) -> bool

Returns true if this cluster is a managed cluster.

source

fn managed_size(&self) -> Option<&str>

Returns the size of the cluster, if the cluster is a managed cluster.

source

fn schedule(&self) -> Option<&ClusterSchedule>

Returns the schedule of the cluster, if the cluster is a managed cluster.

Implementors§