public class CacheEntryAttributes extends org.apache.commons.jcs.engine.ElementAttributes
Modifier and Type | Field and Description |
---|---|
private Map<String,String> |
attrs |
private static String |
ERROR_MESSAGE |
private static String |
ETAG |
private static String |
EXPIRATION_TIME |
private static String |
HTTP_RESPONSE_CODE |
private static String |
LAST_MODIFICATION |
private static String |
NO_TILE_AT_ZOOM |
private static Set<String> |
RESERVED_KEYS |
private static long |
serialVersionUID |
Constructor and Description |
---|
CacheEntryAttributes()
Constructs a new
CacheEntryAttributes . |
Modifier and Type | Method and Description |
---|---|
String |
getErrorMessage() |
String |
getEtag() |
long |
getExpirationTime() |
long |
getLastModification() |
private long |
getLongAttr(String key)
Utility for conversion from String to int, with default to 0, in case of any errors
|
Map<String,String> |
getMetadata()
Returns an unmodifiable Map containing all metadata.
|
int |
getResponseCode() |
boolean |
isNoTileAtZoom() |
void |
setErrorMessage(String message) |
void |
setEtag(String etag)
Sets the ETag header that was set with this entry
|
void |
setExpirationTime(long expirationTime)
sets expiration time for the object in cache
|
void |
setLastModification(long lastModification)
sets last modification of the object in cache
|
void |
setMetadata(Map<String,String> map)
Sets the metadata about cache entry.
|
void |
setNoTileAtZoom(boolean noTileAtZoom)
Sets the marker for "no tile at this zoom level"
|
void |
setResponseCode(int responseCode)
Sets the HTTP response code that was sent with the cache entry
|
addElementEventHandler, addElementEventHandlers, clone, getCreateTime, getElementEventHandlers, getIdleTime, getIsEternal, getIsLateral, getIsRemote, getIsSpool, getLastAccessTime, getMaxLife, getSize, getTimeFactorForMilliseconds, getTimeToLiveSeconds, setCreateTime, setIdleTime, setIsEternal, setIsLateral, setIsRemote, setIsSpool, setLastAccessTime, setLastAccessTimeNow, setMaxLife, setSize, setTimeFactorForMilliseconds, toString
private static final long serialVersionUID
private static final String NO_TILE_AT_ZOOM
private static final String ETAG
private static final String LAST_MODIFICATION
private static final String EXPIRATION_TIME
private static final String HTTP_RESPONSE_CODE
private static final String ERROR_MESSAGE
private static final Set<String> RESERVED_KEYS
public CacheEntryAttributes()
CacheEntryAttributes
.public boolean isNoTileAtZoom()
public void setNoTileAtZoom(boolean noTileAtZoom)
noTileAtZoom
- true if this entry is "no tile at this zoom level"public void setEtag(String etag)
etag
- Etag headerprivate long getLongAttr(String key)
key
- - integer as stringpublic long getLastModification()
public void setLastModification(long lastModification)
lastModification
- time in format of milliseconds from Epochpublic long getExpirationTime()
public void setExpirationTime(long expirationTime)
expirationTime
- in format of milliseconds from epochpublic void setResponseCode(int responseCode)
responseCode
- http status codepublic int getResponseCode()
public void setMetadata(Map<String,String> map)
map
- metadata to savepublic Map<String,String> getMetadata()
public String getErrorMessage()
public void setErrorMessage(String message)
message
- error message related to this object