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

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

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

origin: redisson/redisson

@Override
public CommandAsyncExecutor enableRedissonReferenceSupport(RedissonClient redisson) {
  if (redisson != null) {
    this.redisson = redisson;
    enableRedissonReferenceSupport(redisson.getConfig());
    this.redissonReactive = null;
    this.redissonRx = null;
  }
  return this;
}
origin: redisson/redisson

@Override
public CommandAsyncExecutor enableRedissonReferenceSupport(RedissonClient redisson) {
  if (redisson != null) {
    this.redisson = redisson;
    enableRedissonReferenceSupport(redisson.getConfig());
    this.redissonReactive = null;
    this.redissonRx = null;
  }
  return this;
}
origin: redisson/redisson

public RMap<String, Object> getMap(String sessionId) {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  String name = keyPrefix + separator + "redisson:tomcat_session:" + sessionId;
  return redisson.getMap(name, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
}
origin: redisson/redisson

public RMap<String, Object> getMap(String sessionId) {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  String name = keyPrefix + separator + "redisson:tomcat_session:" + sessionId;
  return redisson.getMap(name, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
}
origin: redisson/redisson

public RMap<String, Object> getMap(String sessionId) {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  String name = keyPrefix + separator + "redisson:tomcat_session:" + sessionId;
  return redisson.getMap(name, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
}
origin: redisson/redisson

public RMap<String, Object> getMap(String sessionId) {
  String separator = keyPrefix == null || keyPrefix.isEmpty() ? "" : ":";
  String name = keyPrefix + separator + "redisson:tomcat_session:" + sessionId;
  return redisson.getMap(name, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
}
origin: redisson/redisson

@Override
public RedisClusterConnection getClusterConnection() {
  if (!redisson.getConfig().isClusterConfig()) {
    throw new InvalidDataAccessResourceUsageException("Redisson is not in Cluster mode");
  }
  return new RedissonClusterConnection(redisson);
}
origin: redisson/redisson

@Override
public RedisClusterConnection getClusterConnection() {
  if (!redisson.getConfig().isClusterConfig()) {
    throw new InvalidDataAccessResourceUsageException("Redisson is not in Cluster mode");
  }
  return new RedissonClusterConnection(redisson);
}
origin: redisson/redisson

@Override
public RedisClusterConnection getClusterConnection() {
  if (!redisson.getConfig().isClusterConfig()) {
    throw new InvalidDataAccessResourceUsageException("Redisson is not in Cluster mode");
  }
  return new RedissonClusterConnection(redisson);
}
origin: redisson/redisson

public RedissonSession(String keyPrefix, String sessionId) {
  this.delegate = new MapSession(sessionId);
  map = redisson.getMap(keyPrefix + sessionId, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
}

origin: redisson/redisson

public RedissonSession(String keyPrefix, String sessionId) {
  this.delegate = new MapSession(sessionId);
  map = redisson.getMap(keyPrefix + sessionId, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
}

origin: redisson/redisson

@Override
public RedisSentinelConnection getSentinelConnection() {
  if (!redisson.getConfig().isSentinelConfig()) {
    throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
  }
  
  SentinelConnectionManager manager = ((SentinelConnectionManager)((Redisson)redisson).getConnectionManager());
  for (RedisClient client : manager.getSentinels()) {
    org.redisson.client.RedisConnection connection = client.connect();
    try {
      String res = connection.sync(RedisCommands.PING);
      if ("pong".equalsIgnoreCase(res)) {
        return new RedissonSentinelConnection(connection);
      }
    } catch (Exception e) {
      log.warn("Can't connect to " + client, e);
      connection.closeAsync();
    }
  }
  
  throw new InvalidDataAccessResourceUsageException("Sentinels are not found");
}
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

@Override
public RedisSentinelConnection getSentinelConnection() {
  if (!redisson.getConfig().isSentinelConfig()) {
    throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
  }
  
  SentinelConnectionManager manager = ((SentinelConnectionManager)((Redisson)redisson).getConnectionManager());
  for (RedisClient client : manager.getSentinels()) {
    org.redisson.client.RedisConnection connection = client.connect();
    try {
      String res = connection.sync(RedisCommands.PING);
      if ("pong".equalsIgnoreCase(res)) {
        return new RedissonSentinelConnection(connection);
      }
    } catch (Exception e) {
      log.warn("Can't connect to " + client, e);
      connection.closeAsync();
    }
  }
  
  throw new InvalidDataAccessResourceUsageException("Sentinels are not found");
}
origin: redisson/redisson

@Override
public RedisSentinelConnection getSentinelConnection() {
  if (!redisson.getConfig().isSentinelConfig()) {
    throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
  }
  
  SentinelConnectionManager manager = ((SentinelConnectionManager)((Redisson)redisson).getConnectionManager());
  for (RedisClient client : manager.getSentinels()) {
    org.redisson.client.RedisConnection connection = client.connect();
    try {
      String res = connection.sync(RedisCommands.PING);
      if ("pong".equalsIgnoreCase(res)) {
        return new RedissonSentinelConnection(connection);
      }
    } catch (Exception e) {
      log.warn("Can't connect to " + client, e);
      connection.closeAsync();
    }
  }
  
  throw new InvalidDataAccessResourceUsageException("Sentinels are not found");
}
origin: redisson/redisson

@Override
public RedisSentinelConnection getSentinelConnection() {
  if (!redisson.getConfig().isSentinelConfig()) {
    throw new InvalidDataAccessResourceUsageException("Redisson is not in Sentinel mode");
  }
  
  SentinelConnectionManager manager = ((SentinelConnectionManager)((Redisson)redisson).getConnectionManager());
  for (RedisClient client : manager.getSentinels()) {
    org.redisson.client.RedisConnection connection = client.connect();
    try {
      String res = connection.sync(RedisCommands.PING);
      if ("pong".equalsIgnoreCase(res)) {
        return new RedissonSentinelConnection(connection);
      }
    } catch (Exception e) {
      log.warn("Can't connect to " + client, e);
      connection.closeAsync();
    }
  }
  
  throw new InvalidDataAccessResourceUsageException("Sentinels are not found");
}
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: debop/hibernate-redis

@SneakyThrows
public RedisClient(@NonNull RedissonClient redisson, int expiryInSeconds) {
 log.trace("RedisClient created. config={}, expiryInSeconds={}", redisson.getConfig().toJSON(), expiryInSeconds);
 this.redisson = redisson;
 if (expiryInSeconds >= 0) {
  this.expiryInSeconds = expiryInSeconds;
 }
}
origin: debop/hibernate-redis

@SneakyThrows
public RedisClient(@NonNull RedissonClient redisson, int expiryInSeconds) {
 log.trace("RedisClient created. config={}, expiryInSeconds={}", redisson.getConfig().toJSON(), expiryInSeconds);
 this.redisson = redisson;
 if (expiryInSeconds >= 0) {
  this.expiryInSeconds = expiryInSeconds;
 }
}
origin: org.redisson/redisson

public RedissonSession(String sessionId) {
  this.delegate = new MapSession(sessionId);
  map = redisson.getMap(keyPrefix + sessionId, new CompositeCodec(StringCodec.INSTANCE, redisson.getConfig().getCodec()));
  principalName = resolvePrincipal(delegate);
}
 
org.redisson.apiRedissonClientgetConfig

Javadoc

Allows to get configuration provided during Redisson instance creation. Further changes on this object not affect Redisson instance.

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
  • getTopic
    Returns topic instance by name using provided codec for messages.
  • getBucket
    Returns object holder instance by name using provided codec for object.
  • 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

  • Finding current android device location
  • getSystemService (Context)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Best IntelliJ 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