internal ListConnectionResult(TrackedNetworkConnection connection, ZoneId timeZone) { ConnectionId = connection.Id(); ConnectTime = ProceduresTimeFormatHelper.FormatTime(connection.ConnectTime(), timeZone); Connector = connection.Connector(); Username = connection.Username(); UserAgent = connection.UserAgent(); ServerAddress = SocketAddress.format(connection.ServerAddress()); ClientAddress = SocketAddress.format(connection.ClientAddress()); }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected: //ORIGINAL LINE: private ReconnectingChannel(io.netty.bootstrap.Bootstrap bootstrap, io.netty.channel.EventLoop eventLoop, org.neo4j.helpers.SocketAddress destination, final org.neo4j.logging.Log log, org.neo4j.causalclustering.helper.TimeoutStrategy connectionBackoffStrategy) private ReconnectingChannel(Bootstrap bootstrap, EventLoop eventLoop, SocketAddress destination, Log log, TimeoutStrategy connectionBackoffStrategy) { this._bootstrap = bootstrap; this._eventLoop = eventLoop; this._destination = destination; this._log = log; this._cappedLogger = (new CappedLogger(log)).setTimeLimit(20, TimeUnit.SECONDS, Clock.systemUTC()); this._connectionBackoffStrategy = connectionBackoffStrategy; this._connectionBackoff = connectionBackoffStrategy.NewTimeout(); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test @SuppressWarnings("deprecation") void shouldExposeClientConnectionInfo() internal virtual void ShouldExposeClientConnectionInfo() { EmbeddedChannel channel = new EmbeddedChannel(); BoltChannel boltChannel = new BoltChannel("bolt-42", "my-bolt", channel); ClientConnectionInfo info1 = boltChannel.Info(); assertEquals("bolt-42", info1.ConnectionId()); assertEquals("bolt", info1.Protocol()); assertEquals(SocketAddress.format(channel.remoteAddress()), info1.ClientAddress()); boltChannel.UpdateUser("Tom", "my-driver"); ClientConnectionInfo info2 = boltChannel.Info(); assertEquals("bolt-42", info2.ConnectionId()); assertEquals("bolt", info2.Protocol()); assertEquals(SocketAddress.format(channel.remoteAddress()), info2.ClientAddress()); assertThat(info2.AsConnectionDetails(), containsString("Tom")); assertThat(info2.AsConnectionDetails(), containsString("my-driver")); }
public ServerHandshakeFinishedEvent_Closed(SocketAddress advertisedSocketAddress) { this.AdvertisedSocketAddress = advertisedSocketAddress; }
public ServerHandshakeFinishedEvent_Created(SocketAddress advertisedSocketAddress, ProtocolStack protocolStack) { this.AdvertisedSocketAddress = advertisedSocketAddress; this.ProtocolStack = protocolStack; }
//JAVA TO C# CONVERTER WARNING: 'final' parameters are ignored unless the option to convert to C# 7.2 'in' parameters is selected: //ORIGINAL LINE: ReconnectingChannel(io.netty.bootstrap.Bootstrap bootstrap, io.netty.channel.EventLoop eventLoop, org.neo4j.helpers.SocketAddress destination, final org.neo4j.logging.Log log) internal ReconnectingChannel(Bootstrap bootstrap, EventLoop eventLoop, SocketAddress destination, Log log) : this(bootstrap, eventLoop, destination, log, new ExponentialBackoffStrategy(100, 1600, MILLISECONDS)) { }