|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MemcachedCacheEntry
Provides for serialization and deserialization of higher-level
HttpCacheEntry
objects into byte arrays suitable for
storage in memcached. Clients wishing to change the serialization
mechanism from the provided defaults should implement this
interface as well as MemcachedCacheEntryFactory
.
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. |
Method Detail |
---|
byte[] toByteArray()
String getStorageKey()
null
if this is an "unset" instance waiting to be
set(byte[])
with a serialized representation.
HttpCacheEntry getHttpCacheEntry()
HttpCacheEntry
associated with this entry.
May return null
if this is an "unset" instance
waiting to be set(byte[])
with a serialized
representation.
void set(byte[] bytes)
MemcachedCacheEntry
,
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
getStorageKey()
and getHttpCacheEntry()
. This
should be viewed as an atomic operation on the
MemcachedCacheEntry
.
bytes
- serialized representation
MemcachedSerializationException
- if deserialization
fails. In this case, the prior values for {getStorageKey()
and getHttpCacheEntry()
should remain unchanged.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |