mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-17 07:26:47 +00:00
Renamed BasicHttpCacheEntry to MemCacheEntry
git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@980939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e0d37d5502
commit
6602f53a8b
@ -37,7 +37,7 @@
|
||||
/**
|
||||
* Basic {@link HttpCache} implementation backed by an instance of {@link LinkedHashMap}.
|
||||
* This cache does NOT deallocate resources associated with the cache entries. It is intended
|
||||
* for use with {@link BasicHttpCacheEntry} and similar.
|
||||
* for use with {@link MemCacheEntry} and similar.
|
||||
*
|
||||
* @since 4.1
|
||||
*/
|
||||
|
@ -50,7 +50,7 @@ public HttpCacheEntry generateEntry(
|
||||
Date responseDate,
|
||||
HttpResponse response,
|
||||
byte[] body) {
|
||||
return new BasicHttpCacheEntry(requestDate,
|
||||
return new MemCacheEntry(requestDate,
|
||||
responseDate,
|
||||
response.getStatusLine(),
|
||||
response.getAllHeaders(),
|
||||
@ -69,7 +69,7 @@ public HttpCacheEntry copyWithVariant(
|
||||
while ((len = instream.read(buf)) != -1) {
|
||||
outstream.write(buf, 0, len);
|
||||
}
|
||||
return new BasicHttpCacheEntry(
|
||||
return new MemCacheEntry(
|
||||
entry.getRequestDate(),
|
||||
entry.getResponseDate(),
|
||||
entry.getStatusLine(),
|
||||
|
@ -78,7 +78,7 @@ public HttpCacheEntry updateCacheEntry(
|
||||
while ((len = instream.read(buf)) != -1) {
|
||||
outstream.write(buf, 0, len);
|
||||
}
|
||||
HttpCacheEntry updated = new BasicHttpCacheEntry(requestDate, responseDate,
|
||||
HttpCacheEntry updated = new MemCacheEntry(requestDate, responseDate,
|
||||
entry.getStatusLine(),
|
||||
mergedHeaders,
|
||||
outstream.toByteArray(),
|
||||
|
@ -42,13 +42,13 @@
|
||||
* explicit deallocation.
|
||||
*/
|
||||
@Immutable
|
||||
public class BasicHttpCacheEntry extends HttpCacheEntry {
|
||||
public class MemCacheEntry extends HttpCacheEntry {
|
||||
|
||||
private static final long serialVersionUID = -8464486112875881235L;
|
||||
|
||||
private final byte[] body;
|
||||
|
||||
public BasicHttpCacheEntry(
|
||||
public MemCacheEntry(
|
||||
final Date requestDate,
|
||||
final Date responseDate,
|
||||
final StatusLine statusLine,
|
@ -30,7 +30,7 @@
|
||||
|
||||
import org.apache.http.Header;
|
||||
|
||||
public class CacheEntry extends BasicHttpCacheEntry {
|
||||
public class CacheEntry extends MemCacheEntry {
|
||||
|
||||
private static final long serialVersionUID = 7964121802841871079L;
|
||||
|
||||
|
@ -144,7 +144,7 @@ public void testCacheEntryCallbackUpdatesCacheEntry() throws Exception {
|
||||
cache.updateEntry("foo", new HttpCacheUpdateCallback() {
|
||||
|
||||
public HttpCacheEntry update(HttpCacheEntry existing) {
|
||||
HttpCacheEntry updated = new BasicHttpCacheEntry(
|
||||
HttpCacheEntry updated = new MemCacheEntry(
|
||||
existing.getRequestDate(),
|
||||
existing.getRequestDate(),
|
||||
existing.getStatusLine(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user