Class RpcNode

java.lang.Object
ru.pathcreator.pyc.rpc.core.RpcNode
All Implemented Interfaces:
AutoCloseable

public final class RpcNode extends Object implements AutoCloseable
Корневой RPC-объект на один процесс.

Root RPC object for one process.

Node владеет: embedded MediaDriver при необходимости, одним Aeron client-ом, общим offload executor-ом, общим receive poller-ом, если он включён, и списком каналов, созданных через этот node.

The node owns: an embedded MediaDriver when needed, a single Aeron client, a shared offload executor, a shared receive poller when enabled, and the list of channels created through the node.

  • Method Details

    • start

      public static RpcNode start(NodeConfig config)
      Запускает RPC node с заданной конфигурацией.

      Starts an RPC node using the provided configuration.

      Parameters:
      config - конфигурация node-а / node configuration
      Returns:
      запущенный RPC node / started RPC node
    • channel

      public RpcChannel channel(ChannelConfig channelConfig)
      Создаёт новый канал и добавляет его в node-owned список каналов.

      Creates a new channel and adds it to the node-owned channel list.

      Parameters:
      channelConfig - конфигурация канала / channel configuration
      Returns:
      новый RPC-канал / new RPC channel
    • close

      public void close()
      Закрывает каналы, Aeron client, optional MediaDriver и shared executor.

      Closes all channels, the Aeron client, the optional MediaDriver, and the shared executor.

      Specified by:
      close in interface AutoCloseable