Browse Source

Added some documentation on the configuration interfaces

Kevin Lovato 11 years ago
parent
commit
cac6751629

+ 14 - 0
src/Abc.Zebus.Directory.Cassandra/Cql/ICassandraConfiguration.cs

@@ -4,12 +4,26 @@ namespace Abc.Zebus.Directory.Cassandra.Cql
 {
     public interface ICassandraConfiguration
     {
+        /// <summary>
+        /// The space separated list of hosts to connect to
+        /// </summary>
         string Hosts { get; }
 
+        /// <summary>
+        /// The Keyspace where the Directory schema is stored
+        /// </summary>
         string KeySpace { get; }
 
+        /// <summary>
+        /// Time after which a query will be retried on another node
+        /// </summary>
         TimeSpan QueryTimeout { get; }
 
+        /// <summary>
+        /// Name of the local datacenter, this allows the CQL driver to favor local nodes
+        /// (since the nodes provides in Hosts are only contact nodes and that the driver
+        /// will discover the rest of the cluster)
+        /// </summary>
         string LocalDataCenter { get; }
     }
 }

+ 32 - 0
src/Abc.Zebus.Directory/Configuration/IDirectoryConfiguration.cs

@@ -4,11 +4,43 @@ namespace Abc.Zebus.Directory.Configuration
 {
     public interface IDirectoryConfiguration
     {
+        /// <summary>
+        /// The interval at which the DeadPeerDetector pings Peers
+        /// </summary>
         TimeSpan PeerPingInterval { get; }
+
+        /// <summary>
+        /// The amount of time after which a Transient Peer will be decommissionned
+        /// if it fails to respond to ping commands
+        /// </summary>
         TimeSpan TransientPeerPingTimeout { get; }
+
+        /// <summary>
+        /// The amount of time after which a Persistent Peer will be decommissionned
+        /// if it fails to respond to ping commands
+        /// </summary>
         TimeSpan PersistentPeerPingTimeout { get; }
+
+        /// <summary>
+        /// The amount of time after which a Peer attached to a debugger will be decommissionned
+        /// if it fails to respond to ping commands (this prevents developers from being disconnected
+        /// when debugging)
+        /// </summary>
         TimeSpan DebugPeerPingTimeout { get; }
+
+        /// <summary>
+        /// The machine names of hosts that are not allowed to connect to this Directory
+        /// (adding your CI server here might prevent bad surprises)
+        /// </summary>
         string[] BlacklistedMachines { get; }
+
+        /// <summary>
+        /// USE WITH CAUTION
+        /// This feature prevents the Peers from subscribing dynamically (https://github.com/Abc-Arbitrage/Zebus/wiki/Routing)
+        /// to the events published by the Directory server.
+        /// Its purpose is to dramatically improve the performance when working on a Bus
+        /// with massive (> 50 000) amounts of dynamic subscriptions (which is not recommended anyway)
+        /// </summary>
         bool DisableDynamicSubscriptionsForDirectoryOutgoingMessages { get; }
     }
 }

+ 20 - 0
src/Abc.Zebus/IBusConfiguration.cs

@@ -4,14 +4,34 @@ namespace Abc.Zebus
 {
     public interface IBusConfiguration
     {
+        /// <summary>
+        /// The list of directories that can be used by the Bus to register.
+        /// The syntax is "tcp://hostname:port"
+        /// </summary>
         string[] DirectoryServiceEndPoints { get; }
 
+        /// <summary>
+        /// The time to for when registering to a Directory, once this time is over,
+        /// the next directory in the list will be used.
+        /// </summary>
         TimeSpan RegistrationTimeout { get; }
 
+        /// <summary>
+        /// The time to wait for when trying to replay messages from the persistence on startup.
+        /// Failing to get a response from the Persistence in the allotted time causes the Peer to stop.
+        /// </summary>
         TimeSpan StartReplayTimeout { get; }
 
+        /// <summary>
+        /// A peer marked as persistent will benefit from the persistence mechanism
+        /// (https://github.com/Abc-Arbitrage/Zebus/wiki/Persistence)
+        /// </summary>
         bool IsPersistent { get; }
         
+        /// <summary>
+        /// Mainly a debugging setting, setting it to false will prevent the Bus from connecting
+        /// to a random Directory when needed
+        /// </summary>
         bool IsDirectoryPickedRandomly { get; }
     }
 }

+ 11 - 0
src/Abc.Zebus/Transport/IZmqTransportConfiguration.cs

@@ -4,8 +4,19 @@ namespace Abc.Zebus.Transport
 {
     public interface IZmqTransportConfiguration 
     {
+        /// <summary>
+        /// The endpoint (tcp://hostname:port, tcp://*:port, etc.) of the inbound connection,
+        /// used by other Peers to communicate with this Peer
+        /// </summary>
         string InboundEndPoint { get; }
 
+        /// <summary>
+        /// When shutting down normallly, the Bus signals to the Peers it has been communicating
+        /// with that it is shutting down and waits for an acknowledgement (this is done to prevent
+        /// message loss in the various buffers).
+        /// To prevent from hanging on shutdown in case of a dead Peer not responding to the
+        /// shutdown signal, the Bus will shutdown after this timeout.
+        /// </summary>
         TimeSpan WaitForEndOfStreamAckTimeout { get; }
     }
 }