org.redisson.Redisson.getTopic()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(230)

本文整理了Java中org.redisson.Redisson.getTopic方法的一些代码示例,展示了Redisson.getTopic的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Redisson.getTopic方法的具体详情如下:
包路径:org.redisson.Redisson
类名称:Redisson
方法名:getTopic

Redisson.getTopic介绍

暂无

代码示例

代码示例来源:origin: redisson/redisson

@Override
public void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V> cacheEntryListenerConfiguration) {
  Map<Integer, String> listenerIds = listeners.remove(cacheEntryListenerConfiguration);
  if (listenerIds != null) {
    for (Map.Entry<Integer, String> entry : listenerIds.entrySet()) {
      redisson.getTopic(entry.getValue()).removeListener(entry.getKey());
    }
  }
  config.removeCacheEntryListenerConfiguration(cacheEntryListenerConfiguration);
}

代码示例来源:origin: redisson/redisson

@Override
public void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V> cacheEntryListenerConfiguration) {
  Map<Integer, String> listenerIds = listeners.remove(cacheEntryListenerConfiguration);
  if (listenerIds != null) {
    for (Map.Entry<Integer, String> entry : listenerIds.entrySet()) {
      redisson.getTopic(entry.getValue()).removeListener(entry.getKey());
    }
  }
  config.removeCacheEntryListenerConfiguration(cacheEntryListenerConfiguration);
}

代码示例来源:origin: redisson/redisson

RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
String channelName = getExpiredChannelName();
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, false));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override

代码示例来源:origin: redisson/redisson

RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
String channelName = getExpiredChannelName();
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, false));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override

代码示例来源:origin: redisson/redisson

tasksName = objectName + ":tasks";
statusName = objectName + ":status";
terminationTopic = redisson.getTopic(objectName + ":termination-topic", LongCodec.INSTANCE);
workersCounterName = objectName + ":workers-counter";
workersTopic = redisson.getTopic(workersChannelName);

代码示例来源:origin: redisson/redisson

tasksName = objectName + ":tasks";
statusName = objectName + ":status";
terminationTopic = redisson.getTopic(objectName + ":termination-topic", LongCodec.INSTANCE);
workersCounterName = objectName + ":workers-counter";
workersTopic = redisson.getTopic(workersChannelName);

代码示例来源:origin: justlive1/earth-frost

@Inject
public RedisJobRepositoryImpl(Redisson redissonClient) {
 this.redissonClient = redissonClient;
 this.workerTopic = redissonClient.getTopic(JobConfig.WORKER_REGISTER);
}

代码示例来源:origin: org.redisson/redisson

@Override
public void deregisterCacheEntryListener(CacheEntryListenerConfiguration<K, V> cacheEntryListenerConfiguration) {
  Map<Integer, String> listenerIds = listeners.remove(cacheEntryListenerConfiguration);
  if (listenerIds != null) {
    for (Map.Entry<Integer, String> entry : listenerIds.entrySet()) {
      redisson.getTopic(entry.getValue()).removeListener(entry.getKey());
    }
  }
  config.removeCacheEntryListenerConfiguration(cacheEntryListenerConfiguration);
}

代码示例来源:origin: Atmosphere/atmosphere-extensions

public void outgoingBroadcast(Object message) {
  RTopic<String> topic = redisson.getTopic(callback.getID());
  try {
    topic.publish(message.toString());
  } catch (Exception e) {
    logger.warn("outgoingBroadcast exception", e);
  }
}

代码示例来源:origin: Atmosphere/atmosphere-extensions

/**
 * {@inheritDoc}
 */
public void incomingBroadcast() {
  String callbackId = callback.getID();
  logger.info("Subscribing to: {}", callbackId);
  if (!callbackId.contains("*")) {
    RTopic<String> topic = redisson.getTopic(callbackId);
    topic.addListener(new MessageListener<String>() {
      public void onMessage(String channel, String message) {
        callback.broadcastReceivedMessage(message);
      }
    });
  } else {
    RPatternTopic<Message> topic1 = redisson.getPatternTopic("topic1.*");
    topic1.addListener(new PatternMessageListener<Message>() {
      @Override
      public void onMessage(String pattern, String channel, Message msg) {
        callback.broadcastReceivedMessage(msg.toString());
      }
    });
  }
}

代码示例来源:origin: org.redisson/redisson

RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, sync));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
String channelName = getExpiredChannelName();
RTopic topic = redisson.getTopic(channelName, new JCacheEventCodec(codec, false));
int listenerId = topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override

代码示例来源:origin: org.redisson/redisson

tasksName = objectName + ":tasks";
statusName = objectName + ":status";
terminationTopic = redisson.getTopic(objectName + ":termination-topic", LongCodec.INSTANCE);
workersCounterName = objectName + ":workers-counter";
workersTopic = redisson.getTopic(workersChannelName);

相关文章