Tabnine Logo
Converters.stringToBooleanConverter
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: spring-projects/spring-data-redis

public static Boolean stringToBoolean(String s) {
  return stringToBooleanConverter().convert(s);
}
origin: spring-projects/spring-data-redis

@Override
public Boolean set(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().set(key, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().set(key, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(connection.getJedis().set(key, value));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean setEx(byte[] key, long seconds, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  if (seconds > Integer.MAX_VALUE) {
    throw new IllegalArgumentException("Time must be less than Integer.MAX_VALUE for setEx in Jedis.");
  }
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().setex(key, (int) seconds, value),
          Converters.stringToBooleanConverter(), () -> false));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().setex(key, (int) seconds, value),
          Converters.stringToBooleanConverter(), () -> false));
      return null;
    }
    return Converters.stringToBoolean(connection.getJedis().setex(key, (int) seconds, value));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean setEx(byte[] key, long seconds, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().setex(key, seconds, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().setex(key, seconds, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(getConnection().setex(key, seconds, value));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean pSetEx(byte[] key, long milliseconds, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().psetex(key, milliseconds, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().psetex(key, milliseconds, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(getConnection().psetex(key, milliseconds, value));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean set(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(
          connection.newLettuceResult(getAsyncConnection().set(key, value), Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newLettuceResult(getAsyncConnection().set(key, value), Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(getConnection().set(key, value));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean pSetEx(byte[] key, long milliseconds, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().psetex(key, milliseconds, value),
          Converters.stringToBooleanConverter(), () -> false));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().psetex(key, milliseconds, value),
          Converters.stringToBooleanConverter(), () -> false));
      return null;
    }
    return Converters.stringToBoolean(connection.getJedis().psetex(key, milliseconds, value));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean set(byte[] key, byte[] value, Expiration expiration, SetOption option) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  Assert.notNull(expiration, "Expiration must not be null!");
  Assert.notNull(option, "Option must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(
          getAsyncConnection().set(key, value, LettuceConverters.toSetArgs(expiration, option)),
          Converters.stringToBooleanConverter(), () -> false));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(
          getAsyncConnection().set(key, value, LettuceConverters.toSetArgs(expiration, option)),
          Converters.stringToBooleanConverter(), () -> false));
      return null;
    }
    return Converters
        .stringToBoolean(getConnection().set(key, value, LettuceConverters.toSetArgs(expiration, option)));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean mSet(Map<byte[], byte[]> tuples) {
  Assert.notNull(tuples, "Tuples must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().mset(tuples), Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newLettuceResult(getAsyncConnection().mset(tuples), Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(getConnection().mset(tuples));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

@Override
public Boolean mSet(Map<byte[], byte[]> tuples) {
  Assert.notNull(tuples, "Tuples must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().mset(JedisConverters.toByteArrays(tuples)),
          Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newJedisResult(connection.getRequiredTransaction().mset(JedisConverters.toByteArrays(tuples)),
              Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(connection.getJedis().mset(JedisConverters.toByteArrays(tuples)));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: spring-projects/spring-data-redis

    Converters.stringToBooleanConverter(), () -> false));
return null;
    Converters.stringToBooleanConverter(), () -> false));
return null;
    Converters.stringToBooleanConverter(), () -> false));
return null;
    Converters.stringToBooleanConverter(), () -> false));
return null;
origin: org.springframework.data/spring-data-redis

public static Boolean stringToBoolean(String s) {
  return stringToBooleanConverter().convert(s);
}
origin: apache/servicemix-bundles

public static Boolean stringToBoolean(String s) {
  return stringToBooleanConverter().convert(s);
}
origin: org.springframework.data/spring-data-redis

@Override
public Boolean set(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().set(key, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().set(key, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(connection.getJedis().set(key, value));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

@Override
public Boolean setEx(byte[] key, long seconds, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().setex(key, seconds, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newLettuceResult(getAsyncConnection().setex(key, seconds, value),
          Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(getConnection().setex(key, seconds, value));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

@Override
public Boolean set(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(
          connection.newLettuceResult(getAsyncConnection().set(key, value), Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newLettuceResult(getAsyncConnection().set(key, value), Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(getConnection().set(key, value));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: apache/servicemix-bundles

@Override
public Boolean set(byte[] key, byte[] value) {
  Assert.notNull(key, "Key must not be null!");
  Assert.notNull(value, "Value must not be null!");
  try {
    if (isPipelined()) {
      pipeline(
          connection.newLettuceResult(getAsyncConnection().set(key, value), Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newLettuceResult(getAsyncConnection().set(key, value), Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(getConnection().set(key, value));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

@Override
public Boolean mSet(Map<byte[], byte[]> tuples) {
  Assert.notNull(tuples, "Tuples must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newLettuceResult(getAsyncConnection().mset(tuples), Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newLettuceResult(getAsyncConnection().mset(tuples), Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(getConnection().mset(tuples));
  } catch (Exception ex) {
    throw convertLettuceAccessException(ex);
  }
}
origin: org.springframework.data/spring-data-redis

@Override
public Boolean mSet(Map<byte[], byte[]> tuples) {
  Assert.notNull(tuples, "Tuples must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().mset(JedisConverters.toByteArrays(tuples)),
          Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newJedisResult(connection.getRequiredTransaction().mset(JedisConverters.toByteArrays(tuples)),
              Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(connection.getJedis().mset(JedisConverters.toByteArrays(tuples)));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
origin: apache/servicemix-bundles

@Override
public Boolean mSet(Map<byte[], byte[]> tuples) {
  Assert.notNull(tuples, "Tuples must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().mset(JedisConverters.toByteArrays(tuples)),
          Converters.stringToBooleanConverter()));
      return null;
    }
    if (isQueueing()) {
      transaction(
          connection.newJedisResult(connection.getRequiredTransaction().mset(JedisConverters.toByteArrays(tuples)),
              Converters.stringToBooleanConverter()));
      return null;
    }
    return Converters.stringToBoolean(connection.getJedis().mset(JedisConverters.toByteArrays(tuples)));
  } catch (Exception ex) {
    throw convertJedisAccessException(ex);
  }
}
org.springframework.data.redis.connection.convertConvertersstringToBooleanConverter

Popular methods of Converters

  • toProperties
  • 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
  • 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

  • Finding current android device location
  • setScale (BigDecimal)
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (Timer)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Reference (javax.naming)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • From CI to AI: The AI layer in your organization
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