@InterfaceAudience.Private public abstract class PersistentIOEngine extends Object implements IOEngine
BucketCache which use persistent IOEngine| Modifier and Type | Class and Description | 
|---|---|
| private static class  | PersistentIOEngine.DuFileCommand | 
| Modifier and Type | Field and Description | 
|---|---|
| private static PersistentIOEngine.DuFileCommand | DU | 
| protected String[] | filePaths | 
| private static org.slf4j.Logger | LOG | 
| Constructor and Description | 
|---|
| PersistentIOEngine(String... filePaths) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected byte[] | calculateChecksum(String algorithm)Using an encryption algorithm to calculate a checksum, the default encryption algorithm is MD5 | 
| private static long | getFileSize(String filePath)Using Linux command du to get file's real size | 
| protected void | verifyFileIntegrity(byte[] persistentChecksum,
                   String algorithm)Verify cache files's integrity | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisPersistent, read, shutdown, sync, usesSharedMemory, write, writeprivate static final org.slf4j.Logger LOG
private static final PersistentIOEngine.DuFileCommand DU
public PersistentIOEngine(String... filePaths)
protected void verifyFileIntegrity(byte[] persistentChecksum, String algorithm) throws IOException
algorithm - the backingMap persistence pathIOExceptionprotected byte[] calculateChecksum(String algorithm)
IOException - something happened like file not existsNoSuchAlgorithmException - no such algorithmprivate static long getFileSize(String filePath) throws IOException
filePath - the fileIOException - something happened like file not existsCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.