public MessageCompletable(RedisChannel channel, RedisValue message, Action <RedisChannel, RedisValue> handler)
 {
     this.channel = channel;
     this.message = message;
     this.handler = handler;
 }
Exemple #2
0
 internal void Write(RedisChannel channel)
 {
     WriteUnified(outStream, ChannelPrefix, channel.Value);
 }
Exemple #3
0
 public CommandChannelValueMessage(int db, CommandFlags flags, RedisCommand command, RedisChannel channel, RedisValue value) : base(db, flags, command, channel)
 {
     value.AssertNotNull();
     this.value = value;
 }
        public Task <long> SubscriptionSubscriberCountAsync(RedisChannel channel, CommandFlags flags = CommandFlags.None)
        {
            var msg = Message.Create(-1, flags, RedisCommand.PUBSUB, RedisLiterals.NUMSUB, channel);

            return(ExecuteAsync(msg, ResultProcessor.PubSubNumSub));
        }
Exemple #5
0
 public CommandChannelBase(int db, CommandFlags flags, RedisCommand command, RedisChannel channel) : base(db, flags, command)
 {
     channel.AssertNotNull();
     this.Channel = channel;
 }
Exemple #6
0
 public CommandChannelMessage(int db, CommandFlags flags, RedisCommand command, RedisChannel channel) : base(db, flags, command, channel)
 {
 }
Exemple #7
0
 public static Message Create(int db, CommandFlags flags, RedisCommand command, RedisChannel channel, RedisValue value)
 {
     return(new CommandChannelValueMessage(db, flags, command, channel, value));
 }
Exemple #8
0
 public static Message Create(int db, CommandFlags flags, RedisCommand command, RedisValue value, RedisChannel channel)
 {
     return(new CommandValueChannelMessage(db, flags, command, value, channel));
 }
        public EndPoint SubscribedEndpoint(RedisChannel channel)
        {
            var server = multiplexer.GetSubscribedServer(channel);

            return(server?.EndPoint);
        }
 public bool IsConnected(RedisChannel channel = default(RedisChannel))
 {
     return(multiplexer.SubscriberConnected(channel));
 }
            public ICompletable ForInvoke(RedisChannel channel, RedisValue message)
            {
                var tmp = handler;

                return(tmp == null ? null : new MessageCompletable(channel, message, tmp));
            }
Exemple #12
0
        public long SubscriptionSubscriberCount(RedisChannel channel, CommandFlags flags = CommandFlags.None)
        {
            var msg = Message.Create(-1, flags, RedisCommand.PUBSUB, RedisLiterals.NUMSUB, channel);

            return(ExecuteSync(msg, ResultProcessor.Int64));
        }
 protected CommandChannelBase(int db, CommandFlags flags, RedisCommand command, RedisChannel channel) : base(db, flags, command)
 {
     channel.AssertNotNull();
     Channel = channel;
 }