/// <summary>
 /// Need to subscribe to cluster changes
 /// </summary>
 protected override void PreStart()
 {
     Cluster = Cluster.Get(Context.System);
     // subscribe to IMemberEvent and UnreachableMember events
     Cluster.Subscribe(Self, ClusterEvent.InitialStateAsEvents,
         new[] { typeof(ClusterEvent.IMemberEvent), typeof(ClusterEvent.UnreachableMember) });
 }
 /// <summary>
 /// Need to subscribe to cluster changes
 /// </summary>
 protected override void PreStart()
 {
     Cluster = Cluster.Get(Context.System);
     // subscribe to IMemberEvent and UnreachableMember events
     Cluster.Subscribe(Self, ClusterEvent.InitialStateAsEvents,
                       new[] { typeof(ClusterEvent.IMemberEvent), typeof(ClusterEvent.UnreachableMember) });
 }
 public TransformationBackend()
 {
     Log     = Logging.GetLogger(Context.System, this);
     Cluster = Akka.Cluster.Cluster.Get(Context.System);
 }
Example #4
0
 /// <summary>
 /// User overridable callback.
 ///                 <p/>
 ///                 Is called when an Actor is started.
 ///                 Actors are automatically started asynchronously when created.
 ///                 Empty default implementation.
 /// </summary>
 protected override void PreStart()
 {
     this.cluster = Cluster.Get(Context.System);
 }
Example #5
0
            /// <summary>
            /// Need to subscribe to cluster changes
            /// </summary>
            protected override void PreStart()
            {
                this.cluster = Cluster.Get(Context.System);
                this.cluster.Subscribe(
                    this.Self,
                    ClusterEvent.InitialStateAsEvents,
                    new[] { typeof(ClusterEvent.IMemberEvent), typeof(ClusterEvent.UnreachableMember) });

                this.cluster.RegisterOnMemberUp(() =>
                    { Context.GetLogger().Info("{Address}: I am up", this.cluster.SelfAddress.Port); });
            }
Example #6
0
 /// <summary>
 /// This constructor is used when creating an instance from configured fully-qualified name
 /// </summary>
 public PerformanceCounterMetricsCollector(ActorSystem system) : this(Cluster.Get(system))
 {
 }
Example #7
0
 private PerformanceCounterMetricsCollector(Cluster cluster) : this(cluster.SelfAddress,
                                                                    EWMA.CalculateAlpha(cluster.Settings.MetricsMovingAverageHalfLife, cluster.Settings.MetricsInterval))
 {
 }