public void Setup(BenchmarkContext context)
 {
     _actorSystem   = ActorSystem.Create("MessageDispatcher" + Counter.GetAndIncrement(), RemoteHocon);
     _systemAddress = RARP.For(_actorSystem).Provider.DefaultAddress;
     _inboundMessageDispatcherCounter = context.GetCounter(MessageDispatcherThroughputCounterName);
     _message        = SerializedMessage.CreateBuilder().SetSerializerId(0).SetMessage(ByteString.CopyFromUtf8("foo")).Build();
     _dispatcher     = new DefaultMessageDispatcher(_actorSystem, RARP.For(_actorSystem).Provider, _actorSystem.Log);
     _targetActorRef = new BenchmarkActorRef(_inboundMessageDispatcherCounter, RARP.For(_actorSystem).Provider);
 }
 public void Setup(BenchmarkContext context)
 {
     _actorSystem = ActorSystem.Create("MessageDispatcher" + Counter.GetAndIncrement(), RemoteHocon);
     _systemAddress = RARP.For(_actorSystem).Provider.DefaultAddress;
     _inboundMessageDispatcherCounter = context.GetCounter(MessageDispatcherThroughputCounterName);
     _message = SerializedMessage.CreateBuilder().SetSerializerId(0).SetMessage(ByteString.CopyFromUtf8("foo")).Build();
     _dispatcher = new DefaultMessageDispatcher(_actorSystem, RARP.For(_actorSystem).Provider, _actorSystem.Log);
     _targetActorRef = new BenchmarkActorRef(_inboundMessageDispatcherCounter, RARP.For(_actorSystem).Provider);
 }
示例#3
0
 public void Setup(BenchmarkContext context)
 {
     _actorSystem   = ActorSystem.Create("MessageDispatcher" + Counter.GetAndIncrement(), RemoteHocon);
     _systemAddress = RARP.For(_actorSystem).Provider.DefaultAddress;
     _inboundMessageDispatcherCounter = context.GetCounter(MessageDispatcherThroughputCounterName);
     _message = new SerializedMessage {
         SerializerId = 0, Message = ByteString.CopyFromUtf8("foo")
     };
     _dispatcher     = new DefaultMessageDispatcher(_actorSystem.AsInstanceOf <ExtendedActorSystem>(), RARP.For(_actorSystem).Provider, _actorSystem.Log);
     _targetActorRef = new BenchmarkActorRef(_inboundMessageDispatcherCounter, RARP.For(_actorSystem).Provider);
 }
示例#4
0
 public static Props ReaderProps(
     Address localAddress, 
     Address remoteAddress, 
     AkkaProtocolTransport transport,
     RemoteSettings settings, 
     AkkaPduCodec codec, 
     IInboundMessageDispatcher dispatcher, 
     bool inbound, 
     int uid,
     ConcurrentDictionary<EndpointManager.Link, EndpointManager.ResendState> receiveBuffers,
     IActorRef reliableDeliverySupervisor = null)
 {
     return
         Props.Create(
             () =>
                 new EndpointReader(localAddress, remoteAddress, transport, settings, codec, dispatcher, inbound,
                     uid, receiveBuffers, reliableDeliverySupervisor))
                     .WithDispatcher(settings.Dispatcher);
 }
示例#5
0
 public EndpointReader(
     Address localAddress, 
     Address remoteAddress, 
     AkkaProtocolTransport transport,
     RemoteSettings settings, 
     AkkaPduCodec codec, 
     IInboundMessageDispatcher msgDispatch, 
     bool inbound,
     int uid, 
     ConcurrentDictionary<EndpointManager.Link, EndpointManager.ResendState> receiveBuffers,
     IActorRef reliableDeliverySupervisor = null) :
     base(localAddress, remoteAddress, transport, settings)
 {
     _receiveBuffers = receiveBuffers;
     _msgDispatch = msgDispatch;
     Inbound = inbound;
     _uid = uid;
     _reliableDeliverySupervisor = reliableDeliverySupervisor;
     _codec = codec;
     _provider = RARP.For(Context.System).Provider;
 }