Examples of PatternTopic


Examples of org.springframework.data.keyvalue.redis.listener.PatternTopic

    String xTopics = element.getAttribute("topic");
    if (StringUtils.hasText(xTopics)) {
      String[] array = StringUtils.delimitedListToStringArray(xTopics, " ");

      for (String string : array) {
        topics.add(string.contains("*") ? new PatternTopic(string) : new ChannelTopic(string));
      }
    }
    ret[0] = builder.getBeanDefinition();
    ret[1] = topics;

View Full Code Here

Examples of org.springframework.data.redis.listener.PatternTopic

    private Collection<Topic> toTopics(String channels) {
        String[] channelsArrays = channels.split(",");
        List<Topic> topics = new ArrayList<Topic>();
        for (String channel : channelsArrays) {
            if (Command.PSUBSCRIBE.toString().equals(redisConfiguration.getCommand())) {
                topics.add(new PatternTopic(channel));
            } else if (Command.SUBSCRIBE.toString().equals(redisConfiguration.getCommand())) {
                topics.add(new ChannelTopic(channel));
            } else {
                throw new RuntimeException("Unsupported Command");
            }
View Full Code Here

Examples of org.springframework.data.redis.listener.PatternTopic

    public RedisMessageListenerContainer redisMessageListenerContainer(
            RedisConnectionFactory connectionFactory) {
        RedisMessageListenerContainer container = new RedisMessageListenerContainer();
        container.setConnectionFactory(connectionFactory);
        container.addMessageListener(redisSessionMessageListener(),
                new PatternTopic("__keyspace@0__:spring:session:sessions:*"));
        return container;
    }
View Full Code Here

Examples of org.springframework.data.redis.listener.PatternTopic

    String xTopics = element.getAttribute("topic");
    if (StringUtils.hasText(xTopics)) {
      String[] array = StringUtils.delimitedListToStringArray(xTopics, " ");

      for (String string : array) {
        topics.add(string.contains("*") ? new PatternTopic(string) : new ChannelTopic(string));
      }
    }
    ret[0] = builder.getBeanDefinition();
    ret[1] = topics;

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.