@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); } }
@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); } }
@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); } }
@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); } }
@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); } }
@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); } }