Class DelegationTokenConfig
- java.lang.Object
-
- org.apache.accumulo.core.client.admin.DelegationTokenConfig
-
public class DelegationTokenConfig extends Object
Configuration options for obtaining a delegation token created bySecurityOperations.getDelegationToken(DelegationTokenConfig)- Since:
- 1.7.0
-
-
Constructor Summary
Constructors Constructor Description DelegationTokenConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)longgetTokenLifetime(TimeUnit unit)The current token lifetime.inthashCode()DelegationTokenConfigsetTokenLifetime(long lifetime, TimeUnit unit)Requests a specific lifetime for the token that is different than the default system lifetime.StringtoString()
-
-
-
Method Detail
-
setTokenLifetime
public DelegationTokenConfig setTokenLifetime(long lifetime, TimeUnit unit)
Requests a specific lifetime for the token that is different than the default system lifetime. The lifetime must not exceed the secret key lifetime configured on the servers.- Parameters:
lifetime- Token lifetimeunit- Unit of time for the lifetime- Returns:
- this
-
getTokenLifetime
public long getTokenLifetime(TimeUnit unit)
The current token lifetime. A value of zero corresponds to using the system configured lifetime.- Parameters:
unit- The unit of time the lifetime should be returned in- Returns:
- Token lifetime in requested unit of time
-
-