Class FSBackend
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
-
- org.apache.jackrabbit.oak.plugins.blob.datastore.FSBackend
-
- All Implemented Interfaces:
org.apache.jackrabbit.oak.spi.blob.SharedBackend
public class FSBackend extends org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
-
-
Field Summary
Fields Modifier and Type Field Description static StringFS_BACKEND_PATH
-
Constructor Summary
Constructors Constructor Description FSBackend()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMetadataRecord(File input, String name)voidaddMetadataRecord(InputStream input, String name)voidclose()voiddeleteAllMetadataRecords(String prefix)booleandeleteMetadataRecord(String name)voiddeleteRecord(DataIdentifier identifier)booleanexists(DataIdentifier identifier)Iterator<DataIdentifier>getAllIdentifiers()List<DataRecord>getAllMetadataRecords(String prefix)Iterator<DataRecord>getAllRecords()DataRecordgetMetadataRecord(String name)byte[]getOrCreateReferenceKey()DataRecordgetRecord(DataIdentifier identifier)voidinit()booleanmetadataRecordExists(String name)InputStreamread(DataIdentifier identifier)voidsetProperties(Properties properties)Properties used to configure the backend.voidwrite(DataIdentifier identifier, File file)
-
-
-
Field Detail
-
FS_BACKEND_PATH
public static final String FS_BACKEND_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init() throws DataStoreException- Throws:
DataStoreException
-
read
public InputStream read(DataIdentifier identifier) throws DataStoreException
- Throws:
DataStoreException
-
write
public void write(DataIdentifier identifier, File file) throws DataStoreException
- Throws:
DataStoreException
-
getRecord
public DataRecord getRecord(DataIdentifier identifier) throws DataStoreException
- Throws:
DataStoreException
-
getAllIdentifiers
public Iterator<DataIdentifier> getAllIdentifiers() throws DataStoreException
- Throws:
DataStoreException
-
exists
public boolean exists(DataIdentifier identifier) throws DataStoreException
- Throws:
DataStoreException
-
deleteRecord
public void deleteRecord(DataIdentifier identifier) throws DataStoreException
- Throws:
DataStoreException
-
addMetadataRecord
public void addMetadataRecord(InputStream input, String name) throws DataStoreException
- Throws:
DataStoreException
-
addMetadataRecord
public void addMetadataRecord(File input, String name) throws DataStoreException
- Throws:
DataStoreException
-
getMetadataRecord
public DataRecord getMetadataRecord(String name)
-
getAllMetadataRecords
public List<DataRecord> getAllMetadataRecords(String prefix)
-
deleteMetadataRecord
public boolean deleteMetadataRecord(String name)
-
deleteAllMetadataRecords
public void deleteAllMetadataRecords(String prefix)
-
metadataRecordExists
public boolean metadataRecordExists(String name)
-
getAllRecords
public Iterator<DataRecord> getAllRecords()
-
close
public void close() throws DataStoreException- Throws:
DataStoreException
-
getOrCreateReferenceKey
public byte[] getOrCreateReferenceKey() throws DataStoreException- Overrides:
getOrCreateReferenceKeyin classorg.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend- Throws:
DataStoreException
-
setProperties
public void setProperties(Properties properties)
Properties used to configure the backend. These are mandatorily to be provided explicitly before calling {init()is invoked.- Parameters:
properties- to configure Backend
-
-