use std::sync::atomic::AtomicU32;
use rocketmq_remoting::protocol::body::ha_runtime_info::HARuntimeInfo;
use rocketmq_rust::ArcMut;
use tokio::sync::Notify;
use tracing::error;
use crate::ha::general_ha_client::GeneralHAClient;
use crate::ha::general_ha_connection::GeneralHAConnection;
use crate::ha::ha_connection_state_notification_request::HAConnectionStateNotificationRequest;
use crate::ha::ha_service::HAService;
use crate::log_file::group_commit_request::GroupCommitRequest;
use crate::store_error::HAResult;
pub struct AutoSwitchHAService;
impl HAService for AutoSwitchHAService {
async fn start(&mut self) -> HAResult<()> {
error!("DefaultHAService start not implemented");
Ok(())
}
async fn shutdown(&self) {
todo!()
}
async fn change_to_master(&self, master_epoch: i32) -> HAResult<bool> {
todo!()
}
async fn change_to_master_when_last_role_is_master(&self, master_epoch: i32) -> HAResult<bool> {
todo!()
}
async fn change_to_slave(
&self,
new_master_addr: &str,
new_master_epoch: i32,
slave_id: Option<i64>,
) -> HAResult<bool> {
todo!()
}
async fn change_to_slave_when_master_not_change(
&self,
new_master_addr: &str,
new_master_epoch: i32,
) -> HAResult<bool> {
todo!()
}
async fn update_master_address(&self, new_addr: &str) {
todo!()
}
async fn update_ha_master_address(&self, new_addr: &str) {
todo!()
}
fn in_sync_replicas_nums(&self, master_put_where: i64) -> i32 {
todo!()
}
fn get_connection_count(&self) -> &AtomicU32 {
todo!()
}
async fn put_request(&self, request: ArcMut<GroupCommitRequest>) {
todo!()
}
fn put_group_connection_state_request(&self, request: HAConnectionStateNotificationRequest) {
todo!()
}
async fn get_connection_list(&self) -> Vec<ArcMut<GeneralHAConnection>> {
todo!()
}
fn get_ha_client(&self) -> Option<&GeneralHAClient> {
todo!()
}
fn get_ha_client_mut(&mut self) -> Option<&mut GeneralHAClient> {
todo!()
}
fn get_push_to_slave_max_offset(&self) -> i64 {
todo!()
}
fn get_runtime_info(&self, master_put_where: i64) -> HARuntimeInfo {
todo!()
}
fn get_wait_notify_object(&self) -> &Notify {
todo!()
}
async fn is_slave_ok(&self, master_put_where: i64) -> bool {
todo!()
}
}