congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Converters.toProperties
Code IndexAdd Tabnine to your IDE (free)

How to use
toProperties
method
in
org.springframework.data.redis.connection.convert.Converters

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

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: 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: 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: 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

/**
 * @param source
 * @return
 * @since 1.4
 */
public static List<RedisServer> toListOfRedisServer(List<Map<String, String>> source) {
  if (CollectionUtils.isEmpty(source)) {
    return Collections.emptyList();
  }
  List<RedisServer> sentinels = new ArrayList<>();
  for (Map<String, String> info : source) {
    sentinels.add(RedisServer.newServerFrom(Converters.toProperties(info)));
  }
  return sentinels;
}
origin: spring-projects/spring-data-redis

/**
 * @param source List of Maps containing node details from SENTINEL SLAVES or SENTINEL MASTERS. May be empty or
 *          {@literal null}.
 * @return List of {@link RedisServer}'s. List is empty if List of Maps is empty.
 * @since 1.5
 */
public static List<RedisServer> toListOfRedisServer(List<Map<String, String>> source) {
  if (CollectionUtils.isEmpty(source)) {
    return Collections.emptyList();
  }
  List<RedisServer> sentinels = new ArrayList<>();
  for (Map<String, String> info : source) {
    sentinels.add(RedisServer.newServerFrom(Converters.toProperties(info)));
  }
  return sentinels;
}
origin: redisson/redisson

@Override
public Properties getConfig(RedisClusterNode node, String pattern) {
  MasterSlaveEntry entry = getEntry(node);
  RFuture<List<String>> f = executorService.writeAsync(entry, StringCodec.INSTANCE, RedisCommands.CONFIG_GET, pattern);
  List<String> r = syncFuture(f);
  if (r != null) {
    return Converters.toProperties(r);
  }
  return null;
}
origin: spring-projects/spring-data-redis

@Override
public Properties getConfig(RedisClusterNode node, String pattern) {
  Assert.hasText(pattern, "Pattern must not be null or empty!");
  return executeCommandOnSingleNode(client -> Converters.toProperties(client.configGet(pattern)), node).getValue();
}
origin: spring-projects/spring-data-redis

@Override
public Properties getConfig(RedisClusterNode node, String pattern) {
  Assert.notNull(pattern, "Pattern must not be null!");
  return connection.getClusterCommandExecutor()
      .executeCommandOnSingleNode(
          (JedisClusterCommandCallback<Properties>) client -> Converters.toProperties(client.configGet(pattern)),
          node)
      .getValue();
}
origin: spring-projects/spring-data-redis

@Override
public Properties getConfig(String pattern) {
  Assert.notNull(pattern, "Pattern must not be null!");
  List<NodeResult<List<String>>> mapResult = connection.getClusterCommandExecutor()
      .executeCommandOnAllNodes((JedisClusterCommandCallback<List<String>>) client -> client.configGet(pattern))
      .getResults();
  List<String> result = new ArrayList<>();
  for (NodeResult<List<String>> entry : mapResult) {
    String prefix = entry.getNode().asString();
    int i = 0;
    for (String value : entry.getValue()) {
      result.add((i++ % 2 == 0 ? (prefix + ".") : "") + value);
    }
  }
  return Converters.toProperties(result);
}
origin: spring-projects/spring-data-redis

@Override
public Properties getConfig(String pattern) {
  Assert.notNull(pattern, "Pattern must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().configGet(pattern),
          Converters.listToPropertiesConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().configGet(pattern),
          Converters.listToPropertiesConverter()));
      return null;
    }
    return Converters.toProperties(connection.getJedis().configGet(pattern));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Properties getConfig(String pattern) {
  Assert.hasText(pattern, "Pattern must not be null or empty!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().configGet(pattern),
          Converters.mapToPropertiesConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().configGet(pattern),
          Converters.mapToPropertiesConverter()));
      return null;
    }
    return Converters.toProperties(getConnection().configGet(pattern));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: apache/servicemix-bundles

/**
 * @param source
 * @return
 * @since 1.4
 */
public static List<RedisServer> toListOfRedisServer(List<Map<String, String>> source) {
  if (CollectionUtils.isEmpty(source)) {
    return Collections.emptyList();
  }
  List<RedisServer> sentinels = new ArrayList<>();
  for (Map<String, String> info : source) {
    sentinels.add(RedisServer.newServerFrom(Converters.toProperties(info)));
  }
  return sentinels;
}
origin: org.springframework.data/spring-data-redis

/**
 * @param source
 * @return
 * @since 1.4
 */
public static List<RedisServer> toListOfRedisServer(List<Map<String, String>> source) {
  if (CollectionUtils.isEmpty(source)) {
    return Collections.emptyList();
  }
  List<RedisServer> sentinels = new ArrayList<>();
  for (Map<String, String> info : source) {
    sentinels.add(RedisServer.newServerFrom(Converters.toProperties(info)));
  }
  return sentinels;
}
origin: org.springframework.data/spring-data-redis

/**
 * @param source List of Maps containing node details from SENTINEL SLAVES or SENTINEL MASTERS. May be empty or
 *          {@literal null}.
 * @return List of {@link RedisServer}'s. List is empty if List of Maps is empty.
 * @since 1.5
 */
public static List<RedisServer> toListOfRedisServer(List<Map<String, String>> source) {
  if (CollectionUtils.isEmpty(source)) {
    return Collections.emptyList();
  }
  List<RedisServer> sentinels = new ArrayList<>();
  for (Map<String, String> info : source) {
    sentinels.add(RedisServer.newServerFrom(Converters.toProperties(info)));
  }
  return sentinels;
}
origin: org.springframework.data/spring-data-redis

@Override
public Properties getConfig(RedisClusterNode node, String pattern) {
  Assert.hasText(pattern, "Pattern must not be null or empty!");
  return executeCommandOnSingleNode(client -> Converters.toProperties(client.configGet(pattern)), node).getValue();
}
origin: apache/servicemix-bundles

@Override
public Properties getConfig(RedisClusterNode node, String pattern) {
  Assert.hasText(pattern, "Pattern must not be null or empty!");
  return executeCommandOnSingleNode(client -> Converters.toProperties(client.configGet(pattern)), node).getValue();
}
origin: org.springframework.data/spring-data-redis

@Override
public Properties getConfig(RedisClusterNode node, String pattern) {
  Assert.notNull(pattern, "Pattern must not be null!");
  return connection.getClusterCommandExecutor().executeCommandOnSingleNode(
      (JedisClusterCommandCallback<Properties>) client -> Converters.toProperties(client.configGet(pattern)), node)
      .getValue();
}
origin: apache/servicemix-bundles

@Override
public Properties getConfig(RedisClusterNode node, String pattern) {
  Assert.notNull(pattern, "Pattern must not be null!");
  return connection.getClusterCommandExecutor().executeCommandOnSingleNode(
      (JedisClusterCommandCallback<Properties>) client -> Converters.toProperties(client.configGet(pattern)), node)
      .getValue();
}
origin: org.springframework.data/spring-data-redis

@Override
public Properties getConfig(String pattern) {
  Assert.notNull(pattern, "Pattern must not be null!");
  List<NodeResult<List<String>>> mapResult = connection.getClusterCommandExecutor()
      .executeCommandOnAllNodes((JedisClusterCommandCallback<List<String>>) client -> client.configGet(pattern))
      .getResults();
  List<String> result = new ArrayList<>();
  for (NodeResult<List<String>> entry : mapResult) {
    String prefix = entry.getNode().asString();
    int i = 0;
    for (String value : entry.getValue()) {
      result.add((i++ % 2 == 0 ? (prefix + ".") : "") + value);
    }
  }
  return Converters.toProperties(result);
}
org.springframework.data.redis.connection.convertConverterstoProperties

Javadoc

Converts array outputs with key-value sequences (such as produced by CONFIG GET) from a List to Properties.

Popular methods of Converters

  • deserializingGeoResultsConverter
    Converter capable of deserializing GeoResults.
  • listToPropertiesConverter
    Returns a converter to convert array outputs with key-value sequences (such as produced by CONFIG GE
  • mapToPropertiesConverter
    Returns a converter to convert from Map to Properties.
  • millisecondsToTimeUnit
    Creates a new Converter to convert from milliseconds to the given TimeUnit.
  • secondsToDuration
    Convert the given nullable seconds to a Duration or null.
  • secondsToTimeUnit
    Creates a new Converter to convert from seconds to the given TimeUnit.
  • stringToBoolean
  • stringToBooleanConverter
  • toClusterNode
    Converts the result of a single line of CLUSTER NODES into a RedisClusterNode.
  • toSetOfRedisClusterNodes
    Converts lines from the result of CLUSTER NODES into RedisClusterNodes.
  • toTimeMillis
    Returns the timestamp constructed from the given seconds and microseconds.
  • toTimeMillis

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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