Search in sources :

Example 21 with SocketAddress

use of io.zeebe.transport.SocketAddress in project zeebe by zeebe-io.

the class Topology method getBroker.

private TopologyBroker getBroker(String host, int port) {
    final SocketAddress brokerAddress = new SocketAddress(host, port);
    TopologyBroker topologyBroker = brokers.get(brokerAddress);
    if (topologyBroker == null) {
        topologyBroker = new TopologyBroker(host, port);
        brokers.put(brokerAddress, topologyBroker);
    }
    return topologyBroker;
}
Also used : SocketAddress(io.zeebe.transport.SocketAddress)

Aggregations

SocketAddress (io.zeebe.transport.SocketAddress)21 Test (org.junit.Test)13 TopologyBroker (io.zeebe.client.clustering.impl.TopologyBroker)6 TaskEvent (io.zeebe.client.event.TaskEvent)3 DirectBuffer (org.agrona.DirectBuffer)3 TopologyBroker (io.zeebe.broker.clustering.handler.TopologyBroker)2 TypedBatchWriter (io.zeebe.broker.logstreams.processor.TypedBatchWriter)2 Raft (io.zeebe.raft.Raft)2 TestUtil.doRepeatedly (io.zeebe.test.util.TestUtil.doRepeatedly)2 TestUtil.waitUntil (io.zeebe.test.util.TestUtil.waitUntil)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 MutableDirectBuffer (org.agrona.MutableDirectBuffer)2 Before (org.junit.Before)2 Topology (io.zeebe.broker.clustering.handler.Topology)1 Member (io.zeebe.broker.clustering.member.Member)1 ClientRule (io.zeebe.broker.it.ClientRule)1 BROKER_1_CLIENT_ADDRESS (io.zeebe.broker.it.clustering.ClusteringRule.BROKER_1_CLIENT_ADDRESS)1 TypedEvent (io.zeebe.broker.logstreams.processor.TypedEvent)1 TypedStreamEnvironment (io.zeebe.broker.logstreams.processor.TypedStreamEnvironment)1