Package org.jboss.resteasy.client.cache
Class LightweightBrowserCache
java.lang.Object
org.jboss.resteasy.client.cache.LightweightBrowserCache
- All Implemented Interfaces:
BrowserCache
Deprecated.
Caching in the Resteasy client framework in resteasy-jaxrs is replaced by
caching in the JAX-RS 2.0 compliant resteasy-client module.
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.
- Version:
- $Revision: 1 $
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.resteasy.client.cache.BrowserCache
BrowserCache.Entry, BrowserCache.Header
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AtomicLong
Deprecated.protected BrowserCache
Deprecated.protected long
Deprecated. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Deprecated.Deprecated.Deprecated.long
Deprecated.Deprecated.long
Deprecated.put
(String key, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> headers, byte[] cached, int expires, String etag, String lastModified) Deprecated.Deprecated.void
setInternalCache
(BrowserCache internalCache) Deprecated.void
setMaxBytes
(long maxBytes) Deprecated.
-
Field Details
-
maxBytes
protected long maxBytesDeprecated. -
internalCache
Deprecated. -
bytes
Deprecated.
-
-
Constructor Details
-
LightweightBrowserCache
public LightweightBrowserCache()Deprecated. -
LightweightBrowserCache
Deprecated.
-
-
Method Details
-
getInternalCache
Deprecated. -
setInternalCache
Deprecated. -
getMaxBytes
public long getMaxBytes()Deprecated. -
setMaxBytes
public void setMaxBytes(long maxBytes) Deprecated. -
getAny
Deprecated.- Specified by:
getAny
in interfaceBrowserCache
-
remove
Deprecated.- Specified by:
remove
in interfaceBrowserCache
-
getByteCount
public long getByteCount()Deprecated. -
get
Deprecated.- Specified by:
get
in interfaceBrowserCache
-
put
public BrowserCache.Entry put(String key, javax.ws.rs.core.MediaType mediaType, javax.ws.rs.core.MultivaluedMap<String, String> headers, byte[] cached, int expires, String etag, String lastModified) Deprecated.- Specified by:
put
in interfaceBrowserCache
-
clear
public void clear()Deprecated.- Specified by:
clear
in interfaceBrowserCache
-