Package org.nuxeo.ecm.core.convert.cache
Interface CachableBlobHolder
-
- All Superinterfaces:
BlobHolder
- All Known Implementing Classes:
SimpleCachableBlobHolder,ZipCachableBlobHolder
public interface CachableBlobHolder extends BlobHolder
Extended interface forBlobHolderthat can be cached.A BlobHolder can be cached if it can be persisted to disk and reloaded from a file. Converters need to return BlobHolders that implement this interface to make the result cachable.
- Author:
- tiry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidload(String path)Reloads theBlobHolderfrom a file.Stringpersist(String basePath)Persists the blobHolder to disk.-
Methods inherited from interface org.nuxeo.ecm.core.api.blobholder.BlobHolder
getBlob, getBlobs, getFilePath, getHash, getModificationDate, getProperties, getProperty, setBlob
-
-
-
-
Method Detail
-
persist
String persist(String basePath) throws IOException
Persists the blobHolder to disk.- Parameters:
basePath- the base path (existing directory) as determined by the caller- Returns:
- the full path of the newly created FileSystem resource
- Throws:
IOException
-
load
void load(String path) throws IOException
Reloads theBlobHolderfrom a file.- Throws:
IOException
-
-