public BridgeServerConfig build() { return new BridgeServerConfig( resolverType, serverList, codec, appName, vipAddress, dataCenterType, shutDownPort, webAdminPort, registrationPort, replicationPort, discoveryPort, replicationReconnectDelayMillis, evictionTimeoutMs, evictionStrategyType, evictionStrategyValue, // bridge server configs refreshRateSec ); } }
@Override protected void loadInstanceProperties(Properties props) { super.loadInstanceProperties(props); props.setProperty("eureka.client.discovery-endpoint.port", Integer.toString(config.getDiscoveryPort())); }
@Override public BridgeServerReport serverReport() { return new BridgeServerReport( config.getRegistrationPort(), config.getDiscoveryPort(), config.getReplicationPort(), formatAdminURI(), DiscoveryClient.getRegion(), DiscoveryManager.getInstance().getEurekaClientConfig().getEurekaServerDNSName() ); }
public static EmbeddedBridgeServer newBridge(final Observable<ChangeNotification<InetSocketAddress>> replicationPeers, boolean withExt, boolean withDashboard) { BridgeServerConfig config = BridgeServerConfig.newBuilder() .withAppName(BRIDGE_SERVER_NAME) .withVipAddress(BRIDGE_SERVER_NAME) .withDataCenterType(DataCenterType.Basic) .withRegistrationPort(BRIDGE_SERVER_PORTS_FROM) .withDiscoveryPort(BRIDGE_SERVER_PORTS_FROM + 1) // explicitly set it to a different port to verify .withReplicationPort(BRIDGE_SERVER_PORTS_FROM + 2) // explicitly set it to a different port to verify .withCodec(Codec.Avro) .withRefreshRateSec(30) .withShutDownPort(BRIDGE_SERVER_PORTS_FROM + 3) .withWebAdminPort(BRIDGE_SERVER_PORTS_FROM + 4) .build(); return new EmbeddedBridgeServer(config, replicationPeers, withExt, withDashboard); }
@Override public void onNext(InstanceInfo self) { logger.info("Starting bridge service"); BridgeChannel channel = new BridgeChannel( registry, discoveryClient, config.getRefreshRateSec(), self, metricFactory.getBridgeChannelMetrics()); if (channelRef.compareAndSet(null, channel)) { channel.connect(); } else { logger.debug("No op, already connected"); } } });
@Override public BridgeServerReport serverReport() { return new BridgeServerReport( config.getRegistrationPort(), config.getDiscoveryPort(), config.getReplicationPort(), getHttpServerPort(), getWebAdminPort(), DiscoveryClient.getRegion(), DiscoveryManager.getInstance().getEurekaClientConfig().getEurekaServerDNSName() ); }
public static EmbeddedBridgeServer newBridge(final Observable<ChangeNotification<Server>> replicationPeers, boolean withExt, boolean withDashboard, CodecType codec) { BridgeServerConfig config = BridgeServerConfig.newBuilder() .withAppName(BRIDGE_SERVER_NAME) .withVipAddress(BRIDGE_SERVER_NAME) .withDataCenterType(DataCenterType.Basic) .withRegistrationPort(BRIDGE_SERVER_PORTS_FROM) .withDiscoveryPort(BRIDGE_SERVER_PORTS_FROM + 1) // explicitly set it to a different port to verify .withReplicationPort(BRIDGE_SERVER_PORTS_FROM + 2) // explicitly set it to a different port to verify .withCodec(codec) .withRefreshRateSec(30) .withShutDownPort(BRIDGE_SERVER_PORTS_FROM + 3) .withWebAdminPort(BRIDGE_SERVER_PORTS_FROM + 4) .build(); return new EmbeddedBridgeServer(config, replicationPeers, withExt, withDashboard); }
@Override public void onNext(InstanceInfo self) { logger.info("Starting bridge service"); BridgeChannel channel = new BridgeChannelImpl( registry, discoveryClient, config.getRefreshRateSec(), self, metricFactory.getBridgeChannelMetrics()); if (channelRef.compareAndSet(null, channel)) { channel.connect(); } else { logger.debug("No op, already connected"); } } });
public BridgeServerConfig build() { return new BridgeServerConfig( resolverType, serverList,