|
|
@ -133,18 +133,24 @@ public final class plasmaHTCache {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int size() {
|
|
|
|
public int size() {
|
|
|
|
return cacheStack.size();
|
|
|
|
synchronized (this.cacheStack) {
|
|
|
|
|
|
|
|
return this.cacheStack.size();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void push(Entry entry) {
|
|
|
|
public void push(Entry entry) {
|
|
|
|
cacheStack.add(entry);
|
|
|
|
synchronized (this.cacheStack) {
|
|
|
|
|
|
|
|
this.cacheStack.add(entry);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Entry pop() {
|
|
|
|
public Entry pop() {
|
|
|
|
if (cacheStack.size() > 0)
|
|
|
|
synchronized (this.cacheStack) {
|
|
|
|
return (Entry) cacheStack.removeFirst();
|
|
|
|
if (this.cacheStack.size() > 0)
|
|
|
|
|
|
|
|
return (Entry) this.cacheStack.removeFirst();
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void storeHeader(String urlHash, httpHeader responseHeader) throws IOException {
|
|
|
|
public void storeHeader(String urlHash, httpHeader responseHeader) throws IOException {
|
|
|
|