@Test public void lowerAndoutdatedTest() { long t0 = System.currentTimeMillis() - 1L; MessageRedeliveryFlag.StatusFlag sf = new MessageRedeliveryFlag.StatusFlag(); sf.lowered(System.currentTimeMillis()); assertTrue(sf.getSuccessTimestamp() > t0); assertTrue(sf.isOutdated(t0)); }
public boolean isOutdated(final String key, final long timestamp) { final ValueOperations<String, String> ops = stringRedisTemplate.opsForValue(); final StatusFlag statusFlag = unmarshal(ops.get(key)); return Objects.isNull(statusFlag) ? false : statusFlag.isOutdated(timestamp); }
MessageRedeliveryFlag { public boolean isOutdated(final String key, final long timestamp) { final ValueOperations<String, String> ops = stringRedisTemplate.opsForValue(); final StatusFlag statusFlag = unmarshal(ops.get(key)); return Objects.isNull(statusFlag) ? false : statusFlag.isOutdated(timestamp); } }
MessageRedeliveryFlag { public boolean isOutdated(final String key, final long timestamp) { final ValueOperations<String, String> ops = stringRedisTemplate.opsForValue(); final StatusFlag statusFlag = unmarshal(ops.get(key)); return Objects.isNull(statusFlag) ? false : statusFlag.isOutdated(timestamp); }  }
MessageRedeliveryFlag { public boolean isOutdated(final String key, final long timestamp) { final ValueOperations<String, String> ops = stringRedisTemplate.opsForValue(); final StatusFlag statusFlag = unmarshal(ops.get(key)); return Objects.isNull(statusFlag) ? false : statusFlag.isOutdated(timestamp); }  boolean isOutdated(final String key, final long timestamp); void raiseError(final String key); void lowerError(final String key, long messageTimestamp); }
MessageRedeliveryFlag { public boolean isOutdated(final String key, final long timestamp) { final ValueOperations<String, String> ops = stringRedisTemplate.opsForValue(); final StatusFlag statusFlag = unmarshal(ops.get(key)); return Objects.isNull(statusFlag) ? false : statusFlag.isOutdated(timestamp); }  boolean isOutdated(final String key, final long timestamp); void raiseError(final String key); void lowerError(final String key, long messageTimestamp);  }