@Test(expected=NullPointerException.class) public void testInvalidExpiry() throws Exception { final PoolEntry<String, HttpConnection> entry = new PoolEntry<>( "route1", TimeValue.of(0L, TimeUnit.MILLISECONDS), currentTimeSupplier); entry.updateExpiry(null); }
public void updateExpiry(final TimeValue expiryTime) { Args.notNull(expiryTime, "Expiry time"); final long currentTime = getCurrentTime(); final Deadline newExpiry = Deadline.calculate(currentTime, expiryTime); this.expiryDeadline = newExpiry.min(this.validityDeadline); this.updated = currentTime; }
PoolEntry { public void updateExpiry(final TimeValue expiryTime) { Args.notNull(expiryTime, "Expiry time"); final long currentTime = getCurrentTime(); final Deadline newExpiry = Deadline.calculate(currentTime, expiryTime); this.expiryDeadline = newExpiry.min(this.validityDeadline); this.updated = currentTime; } }
PoolEntry { public void updateExpiry(final TimeValue expiryTime) { Args.notNull(expiryTime, "Expiry time"); final long currentTime = getCurrentTime(); final Deadline newExpiry = Deadline.calculate(currentTime, expiryTime); this.expiryDeadline = newExpiry.min(this.validityDeadline); this.updated = currentTime; } PoolEntry(final T route, final TimeValue timeToLive, final DisposalCallback<C> disposalCallback,
              final Supplier<Long> currentTimeSupplier);   PoolEntry(final T route, final TimeValue timeToLive, final Supplier<Long> currentTimeSupplier);  PoolEntry(final T route, final TimeValue timeToLive, final DisposalCallback<C> disposalCallback);  PoolEntry(final T route, final TimeValue timeToLive);  PoolEntry(final T route); }
PoolEntry { public void updateExpiry(final TimeValue expiryTime) { Args.notNull(expiryTime, "Expiry time"); final long currentTime = getCurrentTime(); final Deadline newExpiry = Deadline.calculate(currentTime, expiryTime); this.expiryDeadline = newExpiry.min(this.validityDeadline); this.updated = currentTime; } PoolEntry(final T route, final TimeValue timeToLive, final DisposalCallback<C> disposalCallback,
              final Supplier<Long> currentTimeSupplier);   PoolEntry(final T route, final TimeValue timeToLive, final Supplier<Long> currentTimeSupplier);  PoolEntry(final T route, final TimeValue timeToLive, final DisposalCallback<C> disposalCallback);  PoolEntry(final T route, final TimeValue timeToLive);  PoolEntry(final T route); T getRoute(); C getConnection(); Deadline getValidityDeadline(); Object getState(); long getUpdated(); Deadline getExpiryDeadline(); boolean hasConnection(); void assignConnection(final C conn); void discardConnection(final CloseMode closeMode); void updateExpiry(final TimeValue expiryTime); void updateState(final Object state); @Override String toString(); }
PoolEntry { public void updateExpiry(final TimeValue expiryTime) { Args.notNull(expiryTime, "Expiry time"); final long currentTime = getCurrentTime(); final Deadline newExpiry = Deadline.calculate(currentTime, expiryTime); this.expiryDeadline = newExpiry.min(this.validityDeadline); this.updated = currentTime; } PoolEntry(final T route, final TimeValue timeToLive, final DisposalCallback<C> disposalCallback,
              final Supplier<Long> currentTimeSupplier);   PoolEntry(final T route, final TimeValue timeToLive, final Supplier<Long> currentTimeSupplier);  PoolEntry(final T route, final TimeValue timeToLive, final DisposalCallback<C> disposalCallback);  PoolEntry(final T route, final TimeValue timeToLive);  PoolEntry(final T route); T getRoute(); C getConnection(); Deadline getValidityDeadline(); Object getState(); long getUpdated(); Deadline getExpiryDeadline(); boolean hasConnection(); void assignConnection(final C conn); void discardConnection(final CloseMode closeMode); void updateExpiry(final TimeValue expiryTime); void updateState(final Object state); @Override String toString();  }