Esempio n. 1
0
      public SampleCommand(
          IoSession session,
          TimeoutNotifyProducerConsumer<AbstractAsyncCommand> producer)
          :base(session, CommandCode.Test, producer)
      {
 
      }
Esempio n. 2
0
 public AbstractBlockCommand(
     IoSession session,
     CommandCode commandCode,
     TimeoutNotifyProducerConsumer<AbstractAsyncCommand> producer)
     :base(session, commandCode, producer)
 {
     Callback += BlockCommand_Callback;
 }
Esempio n. 3
0
 public AbstractBlockCommand(
     IoSession session,
     CommandCode commandCode,
     TimeoutNotifyProducerConsumer <AbstractAsyncCommand> producer)
     : base(session, commandCode, producer)
 {
     Callback += BlockCommand_Callback;
 }
Esempio n. 4
0
 protected AbstractAsyncCommand(
     IoSession session,
     CommandCode commandCode,
     TimeoutNotifyProducerConsumer <AbstractAsyncCommand> producer)
 {
     this.session     = session;
     this.CommandCode = commandCode;
     this.producer    = producer;
     this.ID          = Guid.NewGuid().ToByteArray().ToBase64();
     this.Version     = MessageVersion.V1;
 }
Esempio n. 5
0
 public SampleCommand(
     IoSession session,
     TimeoutNotifyProducerConsumer <AbstractAsyncCommand> producer)
     : base(session, CommandCode.Test, producer)
 {
 }
Esempio n. 6
0
 public Heartbeat(
     IoSession session,
     TimeoutNotifyProducerConsumer <AbstractAsyncCommand> producer)
     : base(session, CommandCode.Heartbeat, producer)
 {
 }
Esempio n. 7
0
 public Authentication(
     IoSession session,
     TimeoutNotifyProducerConsumer <AbstractAsyncCommand> producer)
     : base(session, CommandCode.Authentication, producer)
 {
 }
Esempio n. 8
0
 public Register(
     IoSession session,
     TimeoutNotifyProducerConsumer<AbstractAsyncCommand> producer)
     : base(session, CommandCode.Register, producer)
 { }
Esempio n. 9
0
 public Authentication(
     IoSession session,
     TimeoutNotifyProducerConsumer<AbstractAsyncCommand> producer)
     : base(session, CommandCode.Authentication, producer)
 { }
Esempio n. 10
0
 public ListConnectors(
     IoSession session,
     TimeoutNotifyProducerConsumer<AbstractAsyncCommand> producer)
     : base(session, CommandCode.ListConnectors, producer)
 { }
Esempio n. 11
0
 public ListConnectors(
     IoSession session,
     TimeoutNotifyProducerConsumer <AbstractAsyncCommand> producer)
     : base(session, CommandCode.ListConnectors, producer)
 {
 }
Esempio n. 12
0
 public Heartbeat(
 IoSession session,
 TimeoutNotifyProducerConsumer<AbstractAsyncCommand> producer)
     : base(session, CommandCode.Heartbeat, producer) { }
Esempio n. 13
0
        public BaseConsumerTask(ConsumerContext context, int partitionId, int localCacheSize)
        {
            Context = context;
            PartitionId = partitionId;
            msgs = new BlockingQueue<IConsumerMessage>(localCacheSize);

            LeaseManager = ComponentLocator.Lookup<ILeaseManager<ConsumerLeaseKey>>(BuildConstants.CONSUMER);
            ConsumerNotifier = ComponentLocator.Lookup<IConsumerNotifier>();
            EndpointClient = ComponentLocator.Lookup<IEndpointClient>();
            EndpointManager = ComponentLocator.Lookup<IEndpointManager>();
            MessageCodec = ComponentLocator.Lookup<IMessageCodec>();
            SystemClockService = ComponentLocator.Lookup<ISystemClockService>();
            Config = ComponentLocator.Lookup<ConsumerConfig>();
            retryPolicy = ComponentLocator.Lookup<IMetaService>().FindRetryPolicyByTopicAndGroup(
                context.Topic.Name, context.GroupId);
            PullMessageResultMonitor = ComponentLocator.Lookup<IPullMessageResultMonitor>();

            pullMessageTaskExecutor = new ProducerConsumer<BasePullMessagesTask>(int.MaxValue);
            pullMessageTaskExecutor.OnConsume += RunPullMessageTask;

            renewLeaseTaskExecutor = new TimeoutNotifyProducerConsumer<RenewLeaseTask>(int.MaxValue);
            renewLeaseTaskExecutor.OnConsume += RunRenewLeaseTask;
        }
Esempio n. 14
0
 public Register(
     IoSession session,
     TimeoutNotifyProducerConsumer <AbstractAsyncCommand> producer)
     : base(session, CommandCode.Register, producer)
 {
 }
Esempio n. 15
0
 public CommandHandler(TimeoutNotifyProducerConsumer<AbstractAsyncCommand> producer)
 {
     this.producer = producer;
 }
Esempio n. 16
0
 public CommandHandler(TimeoutNotifyProducerConsumer <AbstractAsyncCommand> producer)
 {
     this.producer = producer;
 }