Class RpcNode
java.lang.Object
ru.pathcreator.pyc.rpc.core.RpcNode
- All Implemented Interfaces:
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 Summary
Modifier and TypeMethodDescriptionchannel(ChannelConfig channelConfig) Создаёт новый канал и добавляет его в node-owned список каналов.voidclose()Закрывает каналы, Aeron client, optional MediaDriver и shared executor.static RpcNodestart(NodeConfig config) Запускает RPC node с заданной конфигурацией.
-
Method Details
-
start
Запускает RPC node с заданной конфигурацией.Starts an RPC node using the provided configuration.
- Parameters:
config- конфигурация node-а / node configuration- Returns:
- запущенный RPC node / started RPC node
-
channel
Создаёт новый канал и добавляет его в 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:
closein interfaceAutoCloseable
-