public AbstractTransportManager(GossipManager gossipManager, GossipCore gossipCore) { this.gossipManager = gossipManager; this.gossipCore = gossipCore; gossipThreadExecutor = Executors.newCachedThreadPool(); activeGossipThread = ReflectionUtils.constructWithReflection( gossipManager.getSettings().getActiveGossipClass(), new Class<?>[]{ GossipManager.class, GossipCore.class, MetricRegistry.class }, new Object[]{ gossipManager, gossipCore, gossipManager.getRegistry() }); }
private void assertOnlySignedMessages(List<GossipManager> clients){ Assert.assertEquals(0, clients.get(0).getRegistry() .meter(PassiveGossipConstants.UNSIGNED_MESSAGE).getCount()); Assert.assertTrue(clients.get(0).getRegistry() .meter(PassiveGossipConstants.SIGNED_MESSAGE).getCount() > 0); }
settings.getProtocolManagerClass(), new Class<?>[] { GossipSettings.class, String.class, MetricRegistry.class }, new Object[] { settings, me.getId(), this.getRegistry() } );