|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.resteasy.client.cache.LightweightBrowserCache
@Deprecated public class LightweightBrowserCache
In-memory BrowserCache. Uses an underlying cache, with ConcurrentMapCache as the default. You specify maximum bytes you want the cache to have. The default is 2Megabytes. If the cache exceeds this amount, it is wiped clean. This rather draconian approach to cache reaping is to avoid synchronization that you would normally have to do in a sophisticated cache.
With high concurrent access, because this is not a sophisticated cache, sometimes a cache entry may be lost. It is consistent though.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.jboss.resteasy.client.cache.BrowserCache |
|---|
BrowserCache.Entry, BrowserCache.Header |
| Field Summary | |
|---|---|
protected AtomicLong |
bytes
Deprecated. |
protected BrowserCache |
internalCache
Deprecated. |
protected long |
maxBytes
Deprecated. |
| Constructor Summary | |
|---|---|
LightweightBrowserCache()
Deprecated. |
|
LightweightBrowserCache(BrowserCache cache)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
clear()
Deprecated. |
BrowserCache.Entry |
get(String key,
MediaType accept)
Deprecated. |
BrowserCache.Entry |
getAny(String key)
Deprecated. |
long |
getByteCount()
Deprecated. |
BrowserCache |
getInternalCache()
Deprecated. |
long |
getMaxBytes()
Deprecated. |
BrowserCache.Entry |
put(String key,
MediaType mediaType,
MultivaluedMap<String,String> headers,
byte[] cached,
int expires,
String etag,
String lastModified)
Deprecated. |
BrowserCache.Entry |
remove(String key,
MediaType type)
Deprecated. |
void |
setInternalCache(BrowserCache internalCache)
Deprecated. |
void |
setMaxBytes(long maxBytes)
Deprecated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long maxBytes
protected BrowserCache internalCache
protected AtomicLong bytes
| Constructor Detail |
|---|
public LightweightBrowserCache()
public LightweightBrowserCache(BrowserCache cache)
| Method Detail |
|---|
public BrowserCache getInternalCache()
public void setInternalCache(BrowserCache internalCache)
public long getMaxBytes()
public void setMaxBytes(long maxBytes)
public BrowserCache.Entry getAny(String key)
getAny in interface BrowserCache
public BrowserCache.Entry remove(String key,
MediaType type)
remove in interface BrowserCachepublic long getByteCount()
public BrowserCache.Entry get(String key,
MediaType accept)
get in interface BrowserCache
public BrowserCache.Entry put(String key,
MediaType mediaType,
MultivaluedMap<String,String> headers,
byte[] cached,
int expires,
String etag,
String lastModified)
put in interface BrowserCachepublic void clear()
clear in interface BrowserCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||