本文整理了Java中org.redisson.Redisson.getTopic
方法的一些代码示例,展示了Redisson.getTopic
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Redisson.getTopic
方法的具体详情如下:
包路径:org.redisson.Redisson
类名称: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);
内容来源于网络,如有侵权,请联系作者删除!