static class KerberosConnection.RenewalTask extends Object implements Runnable
| Modifier and Type | Field and Description |
|---|---|
private Configuration |
conf |
private LoginContext |
context |
private AtomicBoolean |
keepRunning |
private static org.slf4j.Logger |
RENEWAL_LOG |
private long |
renewalPeriod |
private Subject |
subject |
private KerberosConnection |
utilInstance |
| Constructor and Description |
|---|
KerberosConnection.RenewalTask(KerberosConnection utilInstance,
LoginContext context,
Subject subject,
Configuration conf,
long renewalPeriod) |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
asyncStop() |
(package private) void |
renew()
Logout and log back in with the Kerberos identity.
|
void |
run() |
(package private) boolean |
shouldRenew(long start,
long end,
long now)
Computes whether or not the ticket should be renewed based on the lifetime of the ticket
and the current time.
|
(package private) void |
waitForNextCheck(long renewalPeriod)
Wait the given amount of time.
|
private static final org.slf4j.Logger RENEWAL_LOG
private LoginContext context
private Subject subject
private final KerberosConnection utilInstance
private final Configuration conf
private final long renewalPeriod
private final AtomicBoolean keepRunning
public KerberosConnection.RenewalTask(KerberosConnection utilInstance, LoginContext context, Subject subject, Configuration conf, long renewalPeriod)
boolean shouldRenew(long start,
long end,
long now)
start - The start time of the ticket's validity in millisend - The end time of the ticket's validity in millisnow - Milliseconds since the epochvoid renew()
void waitForNextCheck(long renewalPeriod)
renewalPeriod - The number of milliseconds to waitvoid asyncStop()
Copyright © 2012–2016 The Apache Software Foundation. All rights reserved.