TxSpaceHandler

Trait TxSpaceHandler 

Source
pub trait TxSpaceHandler: TxBaseHandler {
    // Required method
    fn are_all_agents_at_url_blocked(&self, peer_url: &Url) -> K2Result<bool>;

    // Provided methods
    fn recv_space_notify(
        &self,
        peer: Url,
        space_id: SpaceId,
        data: Bytes,
    ) -> K2Result<()> { ... }
    fn set_unresponsive(
        &self,
        peer: Url,
        when: Timestamp,
    ) -> BoxFut<'_, K2Result<()>> { ... }
}
Expand description

Handler for space-related events.

Required Methods§

Source

fn are_all_agents_at_url_blocked(&self, peer_url: &Url) -> K2Result<bool>

Return true if every agent using the passed peer Url is blocked.

Provided Methods§

Source

fn recv_space_notify( &self, peer: Url, space_id: SpaceId, data: Bytes, ) -> K2Result<()>

The sync handler for receiving notifications sent by a remote peer in reference to a particular space. If this callback returns an error, then the connection which sent the message will be closed.

Source

fn set_unresponsive( &self, peer: Url, when: Timestamp, ) -> BoxFut<'_, K2Result<()>>

Mark a peer as unresponsive in the space’s peer meta store

Implementors§