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

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

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

origin: spring-projects/spring-data-redis

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

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

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

@Nullable
@Override
public Duration idletime(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().objectIdletime(key),
          Converters::secondsToDuration));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().objectIdletime(key),
          Converters::secondsToDuration));
      return null;
    }
    return Converters.secondsToDuration(connection.getJedis().objectIdletime(key));
  } catch (Exception ex) {
    throw connection.convertJedisAccessException(ex);
  }
}
origin: apache/servicemix-bundles

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

@Nullable
@Override
public Duration idletime(byte[] key) {
  Assert.notNull(key, "Key must not be null!");
  try {
    if (isPipelined()) {
      pipeline(connection.newJedisResult(connection.getRequiredPipeline().objectIdletime(key),
          Converters::secondsToDuration));
      return null;
    }
    if (isQueueing()) {
      transaction(connection.newJedisResult(connection.getRequiredTransaction().objectIdletime(key),
          Converters::secondsToDuration));
      return null;
    }
    return Converters.secondsToDuration(connection.getJedis().objectIdletime(key));
  } catch (Exception ex) {
    throw connection.convertJedisAccessException(ex);
  }
}
org.springframework.data.redis.connection.convertConverterssecondsToDuration

Javadoc

Convert the given nullable seconds to a Duration or null.

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

  • Reactive rest calls using spring rest template
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • 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