Class LengthCachingDataStore

  • All Implemented Interfaces:
    DataStore

    public class LengthCachingDataStore
    extends AbstractDataStore
    A DelegatingDataStore can avoid performing expensive file system access by making use of pre computed data related to files in DataStore.

    During repository migration actual blob content is not accessed and instead only the blob length and blob references are accessed. DelegatingDataStore can be configured with a mapping file which would be used to determine the length of given blob reference.

    Mapping file format

    
         #< length >| < identifier >
         4432|dd10bca036f3134352c63e534d4568a3d2ac2fdc
         32167|dd10bca036f3134567c63e534d4568a3d2ac2fdc
     

    The Configuration:

    
      <DataStore class="org.apache.jackrabbit.oak.upgrade.blob.LengthCachingDataStore">
          <param name="mappingFilePath" value="/path/to/mapping/file" />
          <param name="delegateClass" value="org.apache.jackrabbit.core.data.FileDataStore" />
      </DataStore>