Class MemcachedCacheEntryFactoryImpl
- java.lang.Object
 - 
- org.apache.http.impl.client.cache.memcached.MemcachedCacheEntryFactoryImpl
 
 
- 
- All Implemented Interfaces:
 MemcachedCacheEntryFactory
public class MemcachedCacheEntryFactoryImpl extends java.lang.Object implements MemcachedCacheEntryFactory
Default implementation ofMemcachedCacheEntryFactory. 
- 
- 
Constructor Summary
Constructors Constructor Description MemcachedCacheEntryFactoryImpl() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MemcachedCacheEntrygetMemcachedCacheEntry(java.lang.String key, HttpCacheEntry entry)Creates a newMemcachedCacheEntryfor storing the givenHttpCacheEntryunder the given storage key.MemcachedCacheEntrygetUnsetCacheEntry()Creates an "unset"MemcachedCacheEntryready to accept a serialized representation viaMemcachedCacheEntry.set(byte[])and deserialize it into a storage key and aHttpCacheEntry. 
 - 
 
- 
- 
Method Detail
- 
getMemcachedCacheEntry
public MemcachedCacheEntry getMemcachedCacheEntry(java.lang.String key, HttpCacheEntry entry)
Description copied from interface:MemcachedCacheEntryFactoryCreates a newMemcachedCacheEntryfor storing the givenHttpCacheEntryunder the given storage key. Since we are hashing storage keys into cache keys to accommodate limitations in memcached's key space, it is possible to have cache collisions. Therefore, we store the storage key along with theHttpCacheEntryso it can be compared on retrieval and thus detect collisions.- Specified by:
 getMemcachedCacheEntryin interfaceMemcachedCacheEntryFactory- Parameters:
 key- storage key under which the entry will be logically storedentry- the cache entry to store- Returns:
 - a 
MemcachedCacheEntryready to provide a serialized representation 
 
- 
getUnsetCacheEntry
public MemcachedCacheEntry getUnsetCacheEntry()
Description copied from interface:MemcachedCacheEntryFactoryCreates an "unset"MemcachedCacheEntryready to accept a serialized representation viaMemcachedCacheEntry.set(byte[])and deserialize it into a storage key and aHttpCacheEntry.- Specified by:
 getUnsetCacheEntryin interfaceMemcachedCacheEntryFactory- Returns:
 MemcachedCacheEntry
 
 - 
 
 -