Tabnine Logo
RedissonClient.getTopic
Code IndexAdd Tabnine to your IDE (free)

How to use
getTopic
method
in
org.redisson.api.RedissonClient

Best Java code snippets using org.redisson.api.RedissonClient.getTopic (Showing top 20 results out of 315)

origin: redisson/redisson

public RTopic getTopic() {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName();
  return redisson.getTopic(name);
}

origin: redisson/redisson

public RTopic getTopic() {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + ((Context) getContainer()).getName();
  return redisson.getTopic(name);
}

origin: redisson/redisson

public RTopic getTopic() {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + ((Context) getContainer()).getName();
  return redisson.getTopic(name);
}

origin: redisson/redisson

public RTopic getTopic() {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  final String name = keyPrefix + separator + "redisson:tomcat_session_updates:" + getContext().getName();
  return redisson.getTopic(name);
}

origin: redisson/redisson

@Override
public void removeListener(int listenerId) {
  RTopic removedTopic = redisson.getTopic(getRemovedChannelName());
  removedTopic.removeListener(listenerId);
  RTopic createdTopic = redisson.getTopic(getCreatedChannelName());
  createdTopic.removeListener(listenerId);
  RTopic updatedTopic = redisson.getTopic(getUpdatedChannelName());
  updatedTopic.removeListener(listenerId);
  RTopic expiredTopic = redisson.getTopic(getExpiredChannelName());
  expiredTopic.removeListener(listenerId);
}
origin: redisson/redisson

@Override
public void removeListener(int listenerId) {
  RTopic removedTopic = redisson.getTopic(getRemovedChannelName());
  removedTopic.removeListener(listenerId);
  RTopic createdTopic = redisson.getTopic(getCreatedChannelName());
  createdTopic.removeListener(listenerId);
  RTopic updatedTopic = redisson.getTopic(getUpdatedChannelName());
  updatedTopic.removeListener(listenerId);
  RTopic expiredTopic = redisson.getTopic(getExpiredChannelName());
  expiredTopic.removeListener(listenerId);
}
origin: mrniko/netty-socketio

@Override
public void unsubscribe(PubSubType type) {
  String name = type.toString();
  Queue<Integer> regIds = map.remove(name);
  RTopic topic = redissonSub.getTopic(name);
  for (Integer id : regIds) {
    topic.removeListener(id);
  }
}
origin: mrniko/netty-socketio

@Override
public <T extends PubSubMessage> void subscribe(PubSubType type, final PubSubListener<T> listener, Class<T> clazz) {
  String name = type.toString();
  RTopic topic = redissonSub.getTopic(name);
  int regId = topic.addListener(PubSubMessage.class, new MessageListener<PubSubMessage>() {
    @Override
    public void onMessage(CharSequence channel, PubSubMessage msg) {
      if (!nodeId.equals(msg.getNodeId())) {
        listener.onMessage((T)msg);
      }
    }
  });
  Queue<Integer> list = map.get(name);
  if (list == null) {
    list = new ConcurrentLinkedQueue<Integer>();
    Queue<Integer> oldList = map.putIfAbsent(name, list);
    if (oldList != null) {
      list = oldList;
    }
  }
  list.add(regId);
}
origin: mrniko/netty-socketio

@Override
public void publish(PubSubType type, PubSubMessage msg) {
  msg.setNodeId(nodeId);
  redissonPub.getTopic(type.toString()).publish(msg);
}
origin: redisson/redisson

RTopic topic = redisson.getTopic(getRemovedChannelName(), new MapCacheEventCodec(codec, isWindows));
return topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(getCreatedChannelName(), new MapCacheEventCodec(codec, isWindows));
return topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(getUpdatedChannelName(), new MapCacheEventCodec(codec, isWindows));
return topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(getExpiredChannelName(), new MapCacheEventCodec(codec, isWindows));
return topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
origin: redisson/redisson

RTopic topic = redisson.getTopic(getRemovedChannelName(), new MapCacheEventCodec(codec, isWindows));
return topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(getCreatedChannelName(), new MapCacheEventCodec(codec, isWindows));
return topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(getUpdatedChannelName(), new MapCacheEventCodec(codec, isWindows));
return topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
RTopic topic = redisson.getTopic(getExpiredChannelName(), new MapCacheEventCodec(codec, isWindows));
return topic.addListener(List.class, new MessageListener<List<Object>>() {
  @Override
origin: redisson/redisson

public RedissonSession(String keyPrefix) {
  this.delegate = new MapSession();
  map = redisson.getMap(keyPrefix + delegate.getId(), new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
  Map<String, Object> newMap = new HashMap<String, Object>(3);
  newMap.put("session:creationTime", delegate.getCreationTime());
  newMap.put("session:lastAccessedTime", delegate.getLastAccessedTime());
  newMap.put("session:maxInactiveInterval", delegate.getMaxInactiveIntervalInSeconds());
  map.putAll(newMap);
  updateExpiration();
  
  String channelName = getEventsChannelName(delegate.getId());
  RTopic topic = redisson.getTopic(channelName, StringCodec.INSTANCE);
  topic.publish(delegate.getId());
}
origin: redisson/redisson

public RedissonSession(String keyPrefix) {
  this.delegate = new MapSession();
  map = redisson.getMap(keyPrefix + delegate.getId(), new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
  Map<String, Object> newMap = new HashMap<String, Object>(3);
  newMap.put("session:creationTime", delegate.getCreationTime());
  newMap.put("session:lastAccessedTime", delegate.getLastAccessedTime());
  newMap.put("session:maxInactiveInterval", delegate.getMaxInactiveIntervalInSeconds());
  map.putAll(newMap);
  updateExpiration();
  
  String channelName = getEventsChannelName(delegate.getId());
  RTopic topic = redisson.getTopic(channelName, StringCodec.INSTANCE);
  topic.publish(delegate.getId());
}
origin: redisson/redisson

public RedissonBaseAdder(CommandAsyncExecutor connectionManager, String name, RedissonClient redisson) {
  super(connectionManager, name);
  topic = redisson.getTopic(suffixName(getName(), "topic"), LongCodec.INSTANCE);
  semaphore = redisson.getSemaphore(suffixName(getName(), "semaphore"));
  listenerId = topic.addListener(Long.class, new MessageListener<Long>() {
origin: redisson/redisson

public RedissonBaseAdder(CommandAsyncExecutor connectionManager, String name, RedissonClient redisson) {
  super(connectionManager, name);
  topic = redisson.getTopic(suffixName(getName(), "topic"), LongCodec.INSTANCE);
  semaphore = redisson.getSemaphore(suffixName(getName(), "semaphore"));
  listenerId = topic.addListener(Long.class, new MessageListener<Long>() {
origin: org.t-io/tio-core

public RedissonTioClusterTopic(String channel, RedissonClient redisson) {
  this.redisson = redisson;
  this.rtopic = redisson.getTopic(TioClusterConfig.TIO_CLUSTER_TOPIC + channel);
}
origin: com.corundumstudio.socketio/netty-socketio

@Override
public void unsubscribe(PubSubType type) {
  String name = type.toString();
  Queue<Integer> regIds = map.remove(name);
  RTopic topic = redissonSub.getTopic(name);
  for (Integer id : regIds) {
    topic.removeListener(id);
  }
}
origin: org.redisson/redisson

@Override
public void removeListener(int listenerId) {
  RTopic removedTopic = redisson.getTopic(getRemovedChannelName());
  removedTopic.removeListener(listenerId);
  RTopic createdTopic = redisson.getTopic(getCreatedChannelName());
  createdTopic.removeListener(listenerId);
  RTopic updatedTopic = redisson.getTopic(getUpdatedChannelName());
  updatedTopic.removeListener(listenerId);
  RTopic expiredTopic = redisson.getTopic(getExpiredChannelName());
  expiredTopic.removeListener(listenerId);
}
origin: yahoo/fili

/**
 * Builds a Broadcastchannel that knows how to communicate with Redis.
 *
 * @param redissonClient  The client to use to communicate with Redis
 */
public RedisBroadcastChannel(RedissonClient redissonClient) {
  this.topic = redissonClient.getTopic(REDIS_CHANNEL);
  this.notifications = PublishSubject.create();
  this.topicReadWriteLock = new ReentrantReadWriteLock();
  listenerId = topic.addListener((channel, msg) -> { notifications.onNext(msg); });
}
origin: com.corundumstudio.socketio/netty-socketio

@Override
public void publish(PubSubType type, PubSubMessage msg) {
  msg.setNodeId(nodeId);
  redissonPub.getTopic(type.toString()).publish(msg);
}
org.redisson.apiRedissonClientgetTopic

Javadoc

Returns topic instance by name.

Popular methods of RedissonClient

  • shutdown
    Shuts down Redisson instance but NOT Redis server Shutdown ensures that no tasks are submitted for '
  • getMap
    Returns map instance by name using provided codec for both map keys and values.
  • getLock
    Returns lock instance by name. Implements a non-fair locking so doesn't guarantees an acquire order
  • getBucket
    Returns object holder instance by name using provided codec for object.
  • getConfig
    Allows to get configuration provided during Redisson instance creation. Further changes on this obje
  • getMapCache
    Returns map-based cache instance by name using provided codec for both cache keys and values. Suppor
  • getAtomicLong
    Returns atomicLong instance by name.
  • getKeys
    Returns interface with methods for Redis keys. Each of Redis/Redisson object associated with own key
  • getScript
    Returns script operations object using provided codec.
  • getSemaphore
    Returns semaphore instance by name
  • getSet
    Returns set instance by name using provided codec for set objects.
  • getBlockingQueue
    Returns unbounded blocking queue instance by name using provided codec for queue objects.
  • getSet,
  • getBlockingQueue,
  • getList,
  • getScoredSortedSet,
  • getExecutorService,
  • getFairLock,
  • getQueue,
  • getReadWriteLock,
  • getListMultimap

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • onRequestPermissionsResult (Fragment)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ImageIO (javax.imageio)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now