static class DiskBasedCache.CacheHeader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.lang.String |
etag
ETag for cache coherence.
|
java.lang.String |
key
The key that identifies the cache entry.
|
java.util.Map<java.lang.String,java.lang.String> |
responseHeaders
Headers from the response resulting in this cache entry.
|
long |
serverDate
Date of this response as reported by the server.
|
long |
size
The size of the data identified by this CacheHeader.
|
long |
softTtl
Soft TTL for this record.
|
long |
ttl
TTL for this record.
|
Modifier | Constructor and Description |
---|---|
private |
CacheHeader() |
|
CacheHeader(java.lang.String key,
Cache.Entry entry)
Instantiates a new CacheHeader object
|
Modifier and Type | Method and Description |
---|---|
static DiskBasedCache.CacheHeader |
readHeader(java.io.InputStream is)
Reads the header off of an InputStream and returns a CacheHeader object.
|
Cache.Entry |
toCacheEntry(byte[] data)
Creates a cache entry for the specified data.
|
boolean |
writeHeader(java.io.OutputStream os)
Writes the contents of this CacheHeader to the specified OutputStream.
|
public long size
public java.lang.String key
public java.lang.String etag
public long serverDate
public long ttl
public long softTtl
public java.util.Map<java.lang.String,java.lang.String> responseHeaders
private CacheHeader()
public CacheHeader(java.lang.String key, Cache.Entry entry)
key
- The key that identifies the cache entryentry
- The cache entry.public static DiskBasedCache.CacheHeader readHeader(java.io.InputStream is) throws java.io.IOException
is
- The InputStream to read from.java.io.IOException
public Cache.Entry toCacheEntry(byte[] data)
public boolean writeHeader(java.io.OutputStream os)