public class MemcachedCacheEntryImpl extends Object implements MemcachedCacheEntry
MemcachedCacheEntry. This implementation
simply uses Java serialization to serialize the storage key followed by
the HttpCacheEntry into a byte array.| Constructor and Description |
|---|
MemcachedCacheEntryImpl() |
MemcachedCacheEntryImpl(String key,
HttpCacheEntry httpCacheEntry) |
| Modifier and Type | Method and Description |
|---|---|
HttpCacheEntry |
getHttpCacheEntry()
Returns the
HttpCacheEntry associated with this entry. |
String |
getStorageKey()
Returns the storage key associated with this entry.
|
void |
set(byte[] bytes)
Given a serialized representation of a
MemcachedCacheEntry,
attempt to reconstitute the storage key and HttpCacheEntry
represented therein. |
byte[] |
toByteArray()
Returns a serialized representation of the current cache entry.
|
public MemcachedCacheEntryImpl(String key, HttpCacheEntry httpCacheEntry)
public MemcachedCacheEntryImpl()
public byte[] toByteArray()
MemcachedCacheEntrytoByteArray in interface MemcachedCacheEntrypublic String getStorageKey()
MemcachedCacheEntrynull if this is an "unset" instance waiting to be
MemcachedCacheEntry.set(byte[]) with a serialized representation.getStorageKey in interface MemcachedCacheEntrypublic HttpCacheEntry getHttpCacheEntry()
MemcachedCacheEntryHttpCacheEntry associated with this entry.
May return null if this is an "unset" instance
waiting to be MemcachedCacheEntry.set(byte[]) with a serialized
representation.getHttpCacheEntry in interface MemcachedCacheEntrypublic void set(byte[] bytes)
MemcachedCacheEntryMemcachedCacheEntry,
attempt to reconstitute the storage key and HttpCacheEntry
represented therein. After a successful call to this method, this
object should return updated (as appropriate) values for
MemcachedCacheEntry.getStorageKey() and MemcachedCacheEntry.getHttpCacheEntry(). This
should be viewed as an atomic operation on the
MemcachedCacheEntry.set in interface MemcachedCacheEntrybytes - serialized representationCopyright © 1999–2022 The Apache Software Foundation. All rights reserved.