internal override ActorMethodInfo GetActorMethodInfo(long key, RemotingListener remotingListener)
        {
            if (remotingListener.Equals(RemotingListener.V2Listener))
            {
                return(this.actorMethodInfoV2[key]);
            }

            return(base.GetActorMethodInfo(key, remotingListener));
        }
Esempio n. 2
0
        internal void ActorMethodStart(long interfaceMethodKey, ActorBase actor, RemotingListener remotingListener)
        {
            var diagCtx    = actor.DiagnosticsContext;
            var mtdEvtArgs = diagCtx.MethodData;

            mtdEvtArgs.ActorId             = actor.Id;
            mtdEvtArgs.InterfaceMethodKey  = interfaceMethodKey;
            mtdEvtArgs.MethodExecutionTime = null;
            mtdEvtArgs.RemotingListener    = remotingListener;
            var methodStopwatch = diagCtx.GetOrCreateActorMethodStopwatch();

            methodStopwatch.Restart();

            var callbacks = this.OnActorMethodStart;

            if (null != callbacks)
            {
                callbacks(mtdEvtArgs);
            }

            // Push the stopwatch to the stopwatch stack. Stack is needed for
            // handling reentrancy.
            diagCtx.PushActorMethodStopwatch(methodStopwatch);
        }
        internal override MethodSpecificCounterWriters GetMethodSpecificCounterWriters(long interfaceMethodKey, RemotingListener remotingListener)
        {
            if (remotingListener.Equals(RemotingListener.V2Listener))
            {
                return(this.actorMethodCounterInstanceDataV2[interfaceMethodKey].CounterWriters);
            }

            return(base.GetMethodSpecificCounterWriters(interfaceMethodKey, remotingListener));
        }
Esempio n. 4
0
        internal void ActorMethodFinish(long interfaceMethodKey, ActorBase actor, Exception e, RemotingListener remotingListener)
        {
            var diagCtx    = actor.DiagnosticsContext;
            var mtdEvtArgs = diagCtx.MethodData;

            // Pop the stopwatch from the stopwatch stack.
            var mtdStopwatch = diagCtx.PopActorMethodStopwatch();

            mtdStopwatch.Stop();
            mtdEvtArgs.ActorId             = actor.Id;
            mtdEvtArgs.InterfaceMethodKey  = interfaceMethodKey;
            mtdEvtArgs.MethodExecutionTime = mtdStopwatch.Elapsed;
            mtdEvtArgs.Exception           = e;
            mtdEvtArgs.RemotingListener    = remotingListener;
            mtdStopwatch.Reset();

            var callbacks = this.OnActorMethodFinish;

            if (null != callbacks)
            {
                callbacks(mtdEvtArgs);
            }
        }
Esempio n. 5
0
        internal virtual ActorMethodInfo GetActorMethodInfo(long key, RemotingListener remotingListener)
        {
            var methodInfo = this.actorMethodInfo[key];

            return(methodInfo);
        }
Esempio n. 6
0
 internal virtual MethodSpecificCounterWriters GetMethodSpecificCounterWriters(long interfaceMethodKey, RemotingListener remotingListener)
 {
     return(this.actorMethodCounterInstanceData[interfaceMethodKey].CounterWriters);
 }
 public ActorEventSubscriberProxy(Guid id, ServiceFabric.Services.Remoting.V2.Runtime.IServiceRemotingCallbackClient callback)
 {
     this.id               = id;
     this.callbackV2       = callback;
     this.remotingListener = RemotingListener.V2Listener;
 }