@Test(expected = NullPointerException.class) public void testSetInvalidTimeUnit() { new DelegationTokenConfig().setTokenLifetime(5, null); }
public DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit) { checkArgument(lifetime >= 0, "Lifetime must be non-negative"); requireNonNull(unit, "TimeUnit was null"); this.lifetime = TimeUnit.MILLISECONDS.convert(lifetime, unit); return this; }
DelegationTokenConfig { public DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit) { checkArgument(lifetime >= 0, "Lifetime must be non-negative"); requireNonNull(unit, "TimeUnit was null"); this.lifetime = TimeUnit.MILLISECONDS.convert(lifetime, unit); return this; } }
DelegationTokenConfig { public DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit) { checkArgument(lifetime >= 0, "Lifetime must be non-negative"); requireNonNull(unit, "TimeUnit was null"); this.lifetime = TimeUnit.MILLISECONDS.convert(lifetime, unit); return this; }  }
DelegationTokenConfig { public DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit) { checkArgument(lifetime >= 0, "Lifetime must be non-negative"); requireNonNull(unit, "TimeUnit was null"); this.lifetime = TimeUnit.MILLISECONDS.convert(lifetime, unit); return this; }  DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit); long getTokenLifetime(TimeUnit unit); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
DelegationTokenConfig { public DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit) { checkArgument(lifetime >= 0, "Lifetime must be non-negative"); requireNonNull(unit, "TimeUnit was null"); this.lifetime = TimeUnit.MILLISECONDS.convert(lifetime, unit); return this; }  DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit); long getTokenLifetime(TimeUnit unit); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }