Fix disk cache impl
This commit is contained in:
parent
ec093acbc2
commit
bf8d6ee38f
@ -31,7 +31,7 @@ import java.util.function.Predicate;
|
|||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
import reactor.util.function.Tuple2;
|
import reactor.util.function.Tuple2;
|
||||||
|
|
||||||
public interface DiskCache extends URLsDiskHandler, URLsWriter, SafeCloseable {
|
public interface DiskCache extends URLsDiskHandler, URLsWriter, SafeCloseable, IBackuppable {
|
||||||
|
|
||||||
void writeMetadataSync(URL url, Metadata metadata);
|
void writeMetadataSync(URL url, Metadata metadata);
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import static org.warp.filesponge.FileSponge.BLOCK_SIZE;
|
|||||||
import it.cavallium.buffer.Buf;
|
import it.cavallium.buffer.Buf;
|
||||||
import it.cavallium.buffer.BufDataInput;
|
import it.cavallium.buffer.BufDataInput;
|
||||||
import it.cavallium.buffer.BufDataOutput;
|
import it.cavallium.buffer.BufDataOutput;
|
||||||
|
import it.cavallium.dbengine.client.IBackuppable;
|
||||||
import it.cavallium.dbengine.database.LLDictionary;
|
import it.cavallium.dbengine.database.LLDictionary;
|
||||||
import it.cavallium.dbengine.database.LLDictionaryResultType;
|
import it.cavallium.dbengine.database.LLDictionaryResultType;
|
||||||
import it.cavallium.dbengine.database.LLKeyValueDatabase;
|
import it.cavallium.dbengine.database.LLKeyValueDatabase;
|
||||||
@ -303,4 +304,27 @@ class DiskCacheImpl implements DiskCache {
|
|||||||
ownedDb.close();
|
ownedDb.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void pauseForBackup() {
|
||||||
|
if (ownedDb != null) {
|
||||||
|
ownedDb.pauseForBackup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resumeAfterBackup() {
|
||||||
|
if (ownedDb != null) {
|
||||||
|
ownedDb.resumeAfterBackup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPaused() {
|
||||||
|
if (ownedDb != null) {
|
||||||
|
return ownedDb.isPaused();
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user