public class BlobCache
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Class and Description |
|---|---|
static class |
BlobCache.LookupRequest |
| Constructor and Description |
|---|
BlobCache(java.lang.String path,
int maxEntries,
int maxBytes,
boolean reset) |
BlobCache(java.lang.String path,
int maxEntries,
int maxBytes,
boolean reset,
int version) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearEntry(long key) |
void |
close() |
static void |
deleteFiles(java.lang.String path) |
void |
insert(long key,
byte[] data) |
boolean |
lookup(BlobCache.LookupRequest req) |
byte[] |
lookup(long key) |
void |
syncAll() |
void |
syncIndex() |
public BlobCache(java.lang.String path,
int maxEntries,
int maxBytes,
boolean reset)
throws java.io.IOException
java.io.IOExceptionpublic BlobCache(java.lang.String path,
int maxEntries,
int maxBytes,
boolean reset,
int version)
throws java.io.IOException
java.io.IOExceptionpublic static void deleteFiles(java.lang.String path)
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void insert(long key,
byte[] data)
throws java.io.IOException
java.io.IOExceptionpublic void clearEntry(long key)
throws java.io.IOException
java.io.IOExceptionpublic byte[] lookup(long key)
throws java.io.IOException
java.io.IOExceptionpublic boolean lookup(BlobCache.LookupRequest req) throws java.io.IOException
java.io.IOExceptionpublic void syncIndex()
public void syncAll()