Tabnine Logo
RedisServer
Code IndexAdd Tabnine to your IDE (free)

How to use
RedisServer
in
org.springframework.data.redis.connection

Best Java code snippets using org.springframework.data.redis.connection.RedisServer (Showing top 20 results out of 315)

origin: redisson/redisson

@Override
public void monitor(RedisServer master) {
  connection.sync(RedisCommands.SENTINEL_MONITOR, master.getName(), master.getHost(), 
                master.getPort().intValue(), master.getQuorum().intValue());
}
origin: redisson/redisson

private static List<RedisServer> toRedisServersList(List<Map<String, String>> source) {
  List<RedisServer> servers = new ArrayList<RedisServer>(source.size());
  for (Map<String, String> info : source) {
    servers.add(RedisServer.newServerFrom(Converters.toProperties(info)));
  }
  return servers;
}

origin: spring-projects/spring-data-redis

/**
 * Creates a new {@link RedisServer} from the given properties.
 *
 * @param properties
 * @return
 */
public static RedisServer newServerFrom(Properties properties) {
  String host = properties.getProperty(INFO.HOST.key, "127.0.0.1");
  int port = Integer.parseInt(properties.getProperty(INFO.PORT.key, "26379"));
  return new RedisServer(host, port, properties);
}
origin: spring-projects/spring-data-redis

/**
 * Creates a new {@link RedisServer} with the given {@code host}, {@code port} and {@code properties}.
 *
 * @param host must not be {@literal null}
 * @param port
 * @param properties may be {@literal null}
 */
public RedisServer(String host, int port, Properties properties) {
  super(host, port);
  this.properties = properties;
  String name = host + ":" + port;
  if (properties != null && properties.containsKey(INFO.NAME.key)) {
    name = get(INFO.NAME);
  }
  setName(name);
}
origin: spring-projects/spring-data-redis

/**
 * Get the number of connected replicas.
 *
 * @return
 * @since 2.1
 */
public Long getNumberReplicas() {
  return getLongValueOf(INFO.NUMBER_SLAVES);
}
origin: spring-projects/spring-data-redis

public String getRunId() {
  return get(INFO.RUN_ID);
}
origin: spring-projects/spring-data-redis

public Long getNumberSlaves() {
  return getNumberReplicas();
}
origin: spring-projects/spring-data-redis

public Long getLastOkPingReply() {
  return getLongValueOf(INFO.LAST_OK_PING_REPLY);
}
origin: spring-projects/spring-data-redis

public String getRoleReported() {
  return get(INFO.ROLE_REPORTED);
}
origin: org.springframework.data/spring-data-redis

/**
 * Creates a new {@link RedisServer} with the given {@code host}, {@code port} and {@code properties}.
 *
 * @param host must not be {@literal null}
 * @param port
 * @param properties may be {@literal null}
 */
public RedisServer(String host, int port, Properties properties) {
  super(host, port);
  this.properties = properties;
  String name = host + ":" + port;
  if (properties != null && properties.containsKey(INFO.NAME.key)) {
    name = get(INFO.NAME);
  }
  setName(name);
}
origin: org.springframework.data/spring-data-redis

public Long getNumberSlaves() {
  return getNumberReplicas();
}
origin: redisson/redisson

@Override
public void monitor(RedisServer master) {
  connection.sync(RedisCommands.SENTINEL_MONITOR, master.getName(), master.getHost(), 
                master.getPort().intValue(), master.getQuorum().intValue());
}
origin: redisson/redisson

private static List<RedisServer> toRedisServersList(List<Map<String, String>> source) {
  List<RedisServer> servers = new ArrayList<RedisServer>(source.size());
  for (Map<String, String> info : source) {
    servers.add(RedisServer.newServerFrom(Converters.toProperties(info)));
  }
  return servers;
}

origin: spring-projects/spring-data-redis

public Long roleReportedTime() {
  return getLongValueOf(INFO.ROLE_REPORTED_TIME);
}
origin: spring-projects/spring-data-redis

public String getFlags() {
  return get(INFO.FLAGS);
}
origin: apache/servicemix-bundles

/**
 * Creates a new {@link RedisServer} with the given {@code host}, {@code port} and {@code properties}.
 *
 * @param host must not be {@literal null}
 * @param port
 * @param properties may be {@literal null}
 */
public RedisServer(String host, int port, Properties properties) {
  super(host, port);
  this.properties = properties;
  String name = host + ":" + port;
  if (properties != null && properties.containsKey(INFO.NAME.key)) {
    name = get(INFO.NAME);
  }
  setName(name);
}
origin: apache/servicemix-bundles

/**
 * Creates a new {@link RedisServer} from the given properties.
 *
 * @param properties
 * @return
 */
public static RedisServer newServerFrom(Properties properties) {
  String host = properties.getProperty(INFO.HOST.key, "127.0.0.1");
  int port = Integer.parseInt(properties.getProperty(INFO.PORT.key, "26379"));
  return new RedisServer(host, port, properties);
}
origin: apache/servicemix-bundles

public Long getNumberSlaves() {
  return getNumberReplicas();
}
origin: redisson/redisson

@Override
public void monitor(RedisServer master) {
  connection.sync(RedisCommands.SENTINEL_MONITOR, master.getName(), master.getHost(), 
                master.getPort().intValue(), master.getQuorum().intValue());
}
origin: redisson/redisson

private static List<RedisServer> toRedisServersList(List<Map<String, String>> source) {
  List<RedisServer> servers = new ArrayList<RedisServer>(source.size());
  for (Map<String, String> info : source) {
    servers.add(RedisServer.newServerFrom(Converters.toProperties(info)));
  }
  return servers;
}

org.springframework.data.redis.connectionRedisServer

Most used methods

  • getHost
  • getName
  • getPort
  • getQuorum
  • newServerFrom
    Creates a new RedisServer from the given properties.
  • <init>
    Creates a new RedisServer with the given host, port and properties.
  • get
  • getLongValueOf
  • getNumberReplicas
    Get the number of connected replicas.
  • getRoleReported
  • setName
  • setName

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • JPanel (javax.swing)
  • Top plugins for Android Studio
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