public class CacheEntryAttributes extends org.apache.commons.jcs.engine.ElementAttributes
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
attrs |
private static java.lang.String |
ERROR_MESSAGE |
private static java.lang.String |
ETAG |
private static java.lang.String |
EXPIRATION_TIME |
private static java.lang.String |
HTTP_RESPONSE_CODE |
private static java.lang.String |
LAST_MODIFICATION |
private static java.lang.String |
NO_TILE_AT_ZOOM |
private static java.util.Set<java.lang.String> |
RESERVED_KEYS |
private static long |
serialVersionUID |
Constructor and Description |
---|
CacheEntryAttributes()
Constructs a new
CacheEntryAttributes . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getErrorMessage() |
java.lang.String |
getEtag() |
long |
getExpirationTime() |
long |
getLastModification() |
private long |
getLongAttr(java.lang.String key)
Utility for conversion from String to int, with default to 0, in case of any errors
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Returns an unmodifiable Map containing all metadata.
|
int |
getResponseCode() |
boolean |
isNoTileAtZoom() |
void |
setError(java.lang.Exception error) |
void |
setErrorMessage(java.lang.String message) |
void |
setEtag(java.lang.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(java.util.Map<java.lang.String,java.lang.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 final java.util.Map<java.lang.String,java.lang.String> attrs
private static final java.lang.String NO_TILE_AT_ZOOM
private static final java.lang.String ETAG
private static final java.lang.String LAST_MODIFICATION
private static final java.lang.String EXPIRATION_TIME
private static final java.lang.String HTTP_RESPONSE_CODE
private static final java.lang.String ERROR_MESSAGE
private static final java.util.Set<java.lang.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 java.lang.String getEtag()
public void setEtag(java.lang.String etag)
etag
- Etag headerprivate long getLongAttr(java.lang.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(java.util.Map<java.lang.String,java.lang.String> map)
map
- metadata to savepublic java.util.Map<java.lang.String,java.lang.String> getMetadata()
public java.lang.String getErrorMessage()
public void setError(java.lang.Exception error)
error
- error related to this objectpublic void setErrorMessage(java.lang.String message)
message
- error message related to this object