|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.impl.client.cache.memcached.MemcachedCacheEntryImpl
public class MemcachedCacheEntryImpl
Default implementation of MemcachedCacheEntry. This implementation
simply uses Java serialization to serialize the storage key followed by
the HttpCacheEntry into a byte array.
| Constructor Summary | |
|---|---|
MemcachedCacheEntryImpl()
|
|
MemcachedCacheEntryImpl(String key,
HttpCacheEntry httpCacheEntry)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemcachedCacheEntryImpl(String key,
HttpCacheEntry httpCacheEntry)
public MemcachedCacheEntryImpl()
| Method Detail |
|---|
public byte[] toByteArray()
MemcachedCacheEntry
toByteArray 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 representation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||