use of org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig in project controller by opendaylight.
the class RpcRegistryTest method staticSetup.
@BeforeClass
public static void staticSetup() throws InterruptedException {
AkkaConfigurationReader reader = ConfigFactory::load;
RemoteRpcProviderConfig config1 = new RemoteRpcProviderConfig.Builder("memberA").gossipTickInterval("200ms").withConfigReader(reader).build();
RemoteRpcProviderConfig config2 = new RemoteRpcProviderConfig.Builder("memberB").gossipTickInterval("200ms").withConfigReader(reader).build();
RemoteRpcProviderConfig config3 = new RemoteRpcProviderConfig.Builder("memberC").gossipTickInterval("200ms").withConfigReader(reader).build();
node1 = ActorSystem.create("opendaylight-rpc", config1.get());
node2 = ActorSystem.create("opendaylight-rpc", config2.get());
node3 = ActorSystem.create("opendaylight-rpc", config3.get());
waitForMembersUp(node1, Cluster.get(node2).selfUniqueAddress(), Cluster.get(node3).selfUniqueAddress());
waitForMembersUp(node2, Cluster.get(node1).selfUniqueAddress(), Cluster.get(node3).selfUniqueAddress());
}
use of org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig in project controller by opendaylight.
the class RemoteRpcRegistryMXBeanImplTest method setUp.
@Before
public void setUp() throws Exception {
system = ActorSystem.create("test");
final DOMRpcIdentifier emptyRpcIdentifier = DOMRpcIdentifier.create(EMPTY_SCHEMA_PATH, YangInstanceIdentifier.EMPTY);
final DOMRpcIdentifier localRpcIdentifier = DOMRpcIdentifier.create(LOCAL_SCHEMA_PATH, YangInstanceIdentifier.of(LOCAL_QNAME));
buckets = Lists.newArrayList(emptyRpcIdentifier, localRpcIdentifier);
final RemoteRpcProviderConfig config = new RemoteRpcProviderConfig.Builder("system").build();
final TestKit invoker = new TestKit(system);
final TestKit registrar = new TestKit(system);
final TestKit supervisor = new TestKit(system);
final Props props = RpcRegistry.props(config, invoker.getRef(), registrar.getRef()).withDispatcher(Dispatchers.DefaultDispatcherId());
testActor = new TestActorRef<>(system, props, supervisor.getRef(), "testActor");
final Timeout timeout = Timeout.apply(10, TimeUnit.SECONDS);
mxBean = new RemoteRpcRegistryMXBeanImpl(new BucketStoreAccess(testActor, system.dispatcher(), timeout), timeout);
}
use of org.opendaylight.controller.remote.rpc.RemoteRpcProviderConfig in project controller by opendaylight.
the class GossiperTest method createGossiper.
/**
* Create Gossiper actor and return the underlying instance of Gossiper class.
*
* @return instance of Gossiper class
*/
private static Gossiper createGossiper() {
final RemoteRpcProviderConfig config = new RemoteRpcProviderConfig.Builder("unit-test").withConfigReader(ConfigFactory::load).build();
final Props props = Gossiper.testProps(config);
final TestActorRef<Gossiper> testRef = TestActorRef.create(system, props, "testGossiper");
return testRef.underlyingActor();
}
Aggregations