You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2017/02/23 13:37:41 UTC
svn commit: r1784130 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BlobCache.java
Author: reschke
Date: Thu Feb 23 13:37:41 2017
New Revision: 1784130
URL: http://svn.apache.org/viewvc?rev=1784130&view=rev
Log:
OAK-5773: BlobCache does not implement Closeable
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BlobCache.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BlobCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BlobCache.java?rev=1784130&r1=1784129&r2=1784130&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BlobCache.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/persistentCache/BlobCache.java Thu Feb 23 13:37:41 2017
@@ -16,6 +16,7 @@
*/
package org.apache.jackrabbit.oak.plugins.document.persistentCache;
+import java.io.Closeable;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
@@ -37,7 +38,7 @@ import org.slf4j.LoggerFactory;
* A persistent blob cache. Only blobs that are smaller than 10% of the maximum
* cache size are stored.
*/
-public class BlobCache implements GarbageCollectableBlobStore, GenerationCache {
+public class BlobCache implements GarbageCollectableBlobStore, GenerationCache, Closeable {
static final Logger LOG = LoggerFactory.getLogger(BlobCache.class);
@@ -224,5 +225,12 @@ public class BlobCache implements Garbag
public void receive(ByteBuffer buff) {
throw new UnsupportedOperationException();
}
+
+ @Override
+ public void close() throws IOException {
+ if (base instanceof Closeable) {
+ ((Closeable)base).close();
+ }
+ }
}