public static FluentConfig LogLevel(this FluentConfig self, LogLevel logLevel) { self.AsInstanceOf <FluentConfigInternals>() .AppendLine(string.Format("akka.loglevel = {0}", logLevel.StringFor())); return(self); }
public static FluentConfig LogRemote(this FluentConfig self, LogLevel lifecycleEvents = LogLevel.DebugLevel, bool receivedMessages = false, bool sentMessages = false) { return(self .LogRemoteLifecycleEvents(lifecycleEvents) .LogReceivedMessages(receivedMessages) .LogSentMessages(sentMessages)); }
public static FluentConfig DefaultDispatcher(this FluentConfig self, Type dispatcherType, int throughput = 100, TimeSpan?throughputDeadlineTimeout = null) { var type = dispatcherType.AssemblyQualifiedName; self.ConfigureDispatcher(type, throughput, throughputDeadlineTimeout); return(self); }
private static FluentConfig LogRemoteLifecycleEvents(this FluentConfig self, LogLevel logLevel) { ((FluentConfigInternals)self).AppendLine(string.Format("akka.remote.log-remote-lifecycle-events = {0}", logLevel.StringFor())); return(self); }
private static FluentConfig DebugLifecycle(this FluentConfig self, bool on) { if (on) { self.AsInstanceOf <FluentConfigInternals>().AppendLine("akka.actor.debug.lifecycle = on"); } return(self); }
private static FluentConfig DebugAutoReceive(this FluentConfig self, bool on) { if (on) { self.AsInstanceOf <FluentConfigInternals>().AppendLine("akka.actor.debug.autoreceive = on"); } return(self); }
/* * log-config-on-start = on * stdout-loglevel = DEBUG * loglevel = ERROR * actor { * provider = ""Akka.Remote.RemoteActorRefProvider, Akka.Remote"" * * debug { * receive = on * autoreceive = on * lifecycle = on * event-stream = on * unhandled = on * } */ public static FluentConfig LogConfigOnStart(this FluentConfig self, bool on) { if (on) { ((FluentConfigInternals)self).AppendLine("akka.log-config-on-start = on"); } return(self); }
public static FluentConfig DebugUnhandled(this FluentConfig self, bool on) { if (on) { self.AsInstanceOf <FluentConfigInternals>().AppendLine("akka.actor.debug.unhandled = on"); } return(self); }
private static FluentConfig DebugEventStream(this FluentConfig self, bool on) { if (on) { self.AsInstanceOf <FluentConfigInternals>().AppendLine("akka.actor.debug.event-stream = on"); } return(self); }
private static FluentConfig LogSentMessages(this FluentConfig self, bool on) { if (on) { self.AsInstanceOf <FluentConfigInternals>().AppendLine("akka.remote.log-sent-messages = on"); } return(self); }
private static FluentConfig LogReceivedMessages(this FluentConfig self, bool on) { if (on) { ((FluentConfigInternals)self).AppendLine("akka.remote.log-received-messages = on"); } return(self); }
public static FluentConfig LogLocal(this FluentConfig self, bool receive = false, bool autoReceive = false, bool lifecycle = false, bool eventStream = false, bool unhandled = false) { return(self.DebugReceive(receive) .DebugAutoReceive(autoReceive) .DebugLifecycle(lifecycle) .DebugEventStream(eventStream) .DebugUnhandled(unhandled)); }
public static FluentConfig DefaultDispatcher(this FluentConfig self, DispatcherType dispatcherType, int throughput = 100, TimeSpan?throughputDeadlineTimeout = null) { string type = dispatcherType.GetName(); self.ConfigureDispatcher(type, throughput, throughputDeadlineTimeout); return(self); }
private static void ConfigureDispatcher(this FluentConfig self, string type, int throughput, TimeSpan?throughputDeadlineTimeout) { self.AsInstanceOf <FluentConfigInternals>() .AppendLine(string.Format("akka.actor.default-dispatcher.type = '{0}'", type)); self.AsInstanceOf <FluentConfigInternals>() .AppendLine(string.Format("akka.actor.default-dispatcher.throughput = {0}", throughput)); self.AsInstanceOf <FluentConfigInternals>() .AppendLine(string.Format("akka.actor.default-dispatcher.throughput-deadline-time = {0}ms", throughputDeadlineTimeout.GetValueOrDefault(TimeSpan.FromSeconds(0)).TotalMilliseconds)); }
public static FluentConfig StartRemotingOn(this FluentConfig self, string hostname, int port) { string remoteConfig = @" akka.actor.provider = ""Akka.Remote.RemoteActorRefProvider, Akka.Remote"" akka.remote.helios.tcp.transport-class = ""Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"" akka.remote.helios.tcp.applied-adapters = [] akka.remote.helios.tcp.transport-protocol = tcp akka.remote.helios.tcp.port = {0} akka.remote.helios.tcp.hostname = 0.0.0.0 #listens on ALL ips for this machine akka.remote.helios.tcp.public-hostname = {1} #but only accepts connections on localhost (usually 127.0.0.1) "; self.AsInstanceOf <FluentConfigInternals>().AppendLine(string.Format(remoteConfig, port, hostname)); return(self); }
/* * remote { * log-received-messages = on * log-sent-messages = on #log-remote-lifecycle-events = on * #this is the new upcoming remoting support, which enables multiple transports * helios.tcp { * transport-class = ""Akka.Remote.Transport.Helios.HeliosTcpTransport, Akka.Remote"" * applied-adapters = [] * transport-protocol = tcp * port = 8081 * hostname = 0.0.0.0 #listens on ALL ips for this machine * public-hostname = localhost #but only accepts connections on localhost (usually 127.0.0.1) * } * log-remote-lifecycle-events = INFO * }*/ public static FluentConfig StartRemotingOn(this FluentConfig self, string hostname) { return(self.StartRemotingOn(hostname, 0)); }