|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hdfs.protocol.CacheDirectiveInfo.Expiration
public static class CacheDirectiveInfo.Expiration
Denotes a relative or absolute expiration time for a CacheDirective. Use
factory methods newAbsolute(Date) and
newRelative(long) to create an
Expiration.
In either case, the server-side clock is used to determine when a CacheDirective expires.
| Field Summary | |
|---|---|
static long |
MAX_RELATIVE_EXPIRY_MS
The maximum value we accept for a relative expiry. |
static CacheDirectiveInfo.Expiration |
NEVER
An relative Expiration that never expires. |
| Method Summary | |
|---|---|
Date |
getAbsoluteDate()
|
long |
getAbsoluteMillis()
|
long |
getMillis()
|
boolean |
isRelative()
|
static CacheDirectiveInfo.Expiration |
newAbsolute(Date date)
Create a new absolute Expiration. |
static CacheDirectiveInfo.Expiration |
newAbsolute(long ms)
Create a new absolute Expiration. |
static CacheDirectiveInfo.Expiration |
newRelative(long ms)
Create a new relative Expiration. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long MAX_RELATIVE_EXPIRY_MS
public static final CacheDirectiveInfo.Expiration NEVER
| Method Detail |
|---|
public static CacheDirectiveInfo.Expiration newRelative(long ms)
Use NEVER to indicate an Expiration that never
expires.
ms - how long until the CacheDirective expires, in milliseconds
public static CacheDirectiveInfo.Expiration newAbsolute(Date date)
Use NEVER to indicate an Expiration that never
expires.
date - when the CacheDirective expires
public static CacheDirectiveInfo.Expiration newAbsolute(long ms)
Use NEVER to indicate an Expiration that never
expires.
ms - when the CacheDirective expires, in milliseconds since the Unix
epoch.
public boolean isRelative()
public long getMillis()
public Date getAbsoluteDate()
Date object. This converts a
relative Expiration into an absolute Date based on the local
clock.public long getAbsoluteMillis()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||