public class ExpirationDetails extends Object
Modifier and Type | Field and Description |
---|---|
static int |
UNLIMITED_AGE |
Constructor and Description |
---|
ExpirationDetails() |
ExpirationDetails(int maxAgeSeconds) |
Modifier and Type | Method and Description |
---|---|
protected long |
getCurrentTimestampSeconds() |
long |
getLastRefreshTimestampSeconds() |
int |
getMaxAgeSeconds() |
long |
getSecondsUntilExpiration() |
boolean |
hasExpired() |
boolean |
hasExpired(boolean halfTime) |
void |
setLastRefreshTimestampSeconds(long lastRefreshTimestampSeconds) |
void |
stampLastRefresh() |
String |
toString() |
public static final int UNLIMITED_AGE
public ExpirationDetails()
public ExpirationDetails(int maxAgeSeconds)
public int getMaxAgeSeconds()
public long getLastRefreshTimestampSeconds()
public void setLastRefreshTimestampSeconds(long lastRefreshTimestampSeconds)
public void stampLastRefresh()
public boolean hasExpired()
public boolean hasExpired(boolean halfTime)
halfTime
- If true
then half maximum age is used to determine expiration.true
if the maximum age has been reached.public long getSecondsUntilExpiration()
protected long getCurrentTimestampSeconds()
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.