Interface EventBusRegion


public interface EventBusRegion
Event Bus Management Domain
1. Manages subscriber information of other processes.
2. If multiple logic services are started within one process, the subscribers of these logic services will be added here.
Since:
21
Author:
渔民小镇
date:
2023-12-24
  • Method Details

    • getEventBus

      EventBus getEventBus(int serverId)
      Get the EventBus instance for the given server ID.
      Parameters:
      serverId - the server ID
      Returns:
      the EventBus instance associated with the server ID
    • addLocal

      void addLocal(EventBus eventBus)
      Register a local EventBus instance in this region.
      Parameters:
      eventBus - the EventBus instance to register
    • listLocalSubscriber

      List<Subscriber> listLocalSubscriber(EventBusMessage eventBusMessage)
      Gets all subscribers in the current process based on the event message
      Parameters:
      eventBusMessage - The event message
      Returns:
      All subscribers in the current process
    • loadRemoteEventTopic

      void loadRemoteEventTopic(EventServerMessage eventServerMessage)
      Load event topics from a remote server.
      Parameters:
      eventServerMessage - the remote server message containing topic information
    • unloadRemoteTopic

      void unloadRemoteTopic(EventServerMessage eventServerMessage)
      Unload event topics from a disconnected remote server.
      Parameters:
      eventServerMessage - the remote server message to unload
    • listRemoteEventServerMessage

      Set<EventServerMessage> listRemoteEventServerMessage(EventBusMessage eventBusMessage)
      Get remote server messages that have subscribers for the given event.
      Parameters:
      eventBusMessage - the event message to match against remote subscribers
      Returns:
      set of remote server messages with matching subscribers