コード例 #1
0
 public MessageCompletable(RedisChannel channel, RedisValue message, Action <RedisChannel, RedisValue> handler)
 {
     this.channel = channel;
     this.message = message;
     this.handler = handler;
 }
コード例 #2
0
 internal void Write(RedisChannel channel)
 {
     WriteUnified(outStream, ChannelPrefix, channel.Value);
 }
コード例 #3
0
ファイル: Message.cs プロジェクト: mc15/StackExchange.Redis
 public CommandChannelValueMessage(int db, CommandFlags flags, RedisCommand command, RedisChannel channel, RedisValue value) : base(db, flags, command, channel)
 {
     value.AssertNotNull();
     this.value = value;
 }
コード例 #4
0
        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));
        }
コード例 #5
0
ファイル: Message.cs プロジェクト: mc15/StackExchange.Redis
 public CommandChannelBase(int db, CommandFlags flags, RedisCommand command, RedisChannel channel) : base(db, flags, command)
 {
     channel.AssertNotNull();
     this.Channel = channel;
 }
コード例 #6
0
ファイル: Message.cs プロジェクト: mc15/StackExchange.Redis
 public CommandChannelMessage(int db, CommandFlags flags, RedisCommand command, RedisChannel channel) : base(db, flags, command, channel)
 {
 }
コード例 #7
0
ファイル: Message.cs プロジェクト: mc15/StackExchange.Redis
 public static Message Create(int db, CommandFlags flags, RedisCommand command, RedisChannel channel, RedisValue value)
 {
     return(new CommandChannelValueMessage(db, flags, command, channel, value));
 }
コード例 #8
0
ファイル: Message.cs プロジェクト: mc15/StackExchange.Redis
 public static Message Create(int db, CommandFlags flags, RedisCommand command, RedisValue value, RedisChannel channel)
 {
     return(new CommandValueChannelMessage(db, flags, command, value, channel));
 }
コード例 #9
0
        public EndPoint SubscribedEndpoint(RedisChannel channel)
        {
            var server = multiplexer.GetSubscribedServer(channel);

            return(server?.EndPoint);
        }
コード例 #10
0
 public bool IsConnected(RedisChannel channel = default(RedisChannel))
 {
     return(multiplexer.SubscriberConnected(channel));
 }
コード例 #11
0
            public ICompletable ForInvoke(RedisChannel channel, RedisValue message)
            {
                var tmp = handler;

                return(tmp == null ? null : new MessageCompletable(channel, message, tmp));
            }
コード例 #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));
        }
コード例 #13
0
 protected CommandChannelBase(int db, CommandFlags flags, RedisCommand command, RedisChannel channel) : base(db, flags, command)
 {
     channel.AssertNotNull();
     Channel = channel;
 }