java.lang.Object
org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
org.apache.jackrabbit.oak.plugins.blob.datastore.FSBackend
All Implemented Interfaces:
SharedBackend

@Deprecated(since="2024-09-23") public class FSBackend extends AbstractSharedBackend
Deprecated.
The Jackrabbit Oak Blob Plugins library is designed for Oak-internal use only and thus deprecated. It will not be part of the AEM SDK after April 2025.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Deprecated.
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated.
    Adds a metadata record with the specified name
    void
    Deprecated.
    Adds a metadata record with the specified name
    void
    Deprecated.
    Close backend and release resources like database connection if any.
    void
    Deprecated.
    Deletes all the metadata records with the specified prefix.
    boolean
    Deprecated.
    Deletes the metadata record with the specified name
    void
    deleteRecord(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier)
    Deprecated.
    Delete record identified by identifier.
    boolean
    exists(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier)
    Deprecated.
    This method check the existence of record in backend.
    Iterator<org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier>
    Deprecated.
    Returns identifiers of all records that exists in backend.
    List<org.apache.jackrabbit.oak.spi.blob.data.DataRecord>
    Deprecated.
    Gets all the metadata with a specified prefix.
    Iterator<org.apache.jackrabbit.oak.spi.blob.data.DataRecord>
    Deprecated.
    Returns a list of all DataRecords
    org.apache.jackrabbit.oak.spi.blob.data.DataRecord
    Deprecated.
    Gets the metadata of the specified name.
    byte[]
    Deprecated.
    Returns the reference key of this backend.
    org.apache.jackrabbit.oak.spi.blob.data.DataRecord
    getRecord(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier)
    Deprecated.
    Gets the record with the specified identifier
    void
    Deprecated.
    Initialize
    boolean
    Deprecated.
    Checks if the metadata record with the specified name exists.
    read(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier)
    Deprecated.
    Return inputstream of record identified by identifier.
    void
    Deprecated.
    Properties used to configure the backend.
    void
    write(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier, File file)
    Deprecated.
    Stores file to backend with identifier used as key.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • FSBackend

      public FSBackend()
      Deprecated.
  • Method Details

    • init

      public void init() throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Initialize
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
    • read

      public InputStream read(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier) throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Return inputstream of record identified by identifier.
      Parameters:
      identifier - identifier of record.
      Returns:
      inputstream of the record.
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException - if record not found or any error.
    • write

      public void write(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier, File file) throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Stores file to backend with identifier used as key. If key pre-exists, it updates the timestamp of the key.
      Parameters:
      identifier - key of the file
      file - file that would be stored in backend.
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException - for any error.
    • getRecord

      public org.apache.jackrabbit.oak.spi.blob.data.DataRecord getRecord(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier) throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Gets the record with the specified identifier
      Parameters:
      identifier - the record identifier
      Returns:
      the metadata DataRecord
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
    • getAllIdentifiers

      public Iterator<org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier> getAllIdentifiers() throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Returns identifiers of all records that exists in backend.
      Returns:
      iterator consisting of all identifiers
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
    • exists

      public boolean exists(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier) throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      This method check the existence of record in backend.
      Parameters:
      identifier - identifier to be checked.
      Returns:
      true if records exists else false.
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
    • deleteRecord

      public void deleteRecord(org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier identifier) throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Delete record identified by identifier. No-op if identifier not found.
      Parameters:
      identifier -
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
    • addMetadataRecord

      public void addMetadataRecord(InputStream input, String name) throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Adds a metadata record with the specified name
      Parameters:
      input - the record input stream
      name - the name
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
    • addMetadataRecord

      public void addMetadataRecord(File input, String name) throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Adds a metadata record with the specified name
      Parameters:
      input - the record file
      name - the name
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
    • getMetadataRecord

      public org.apache.jackrabbit.oak.spi.blob.data.DataRecord getMetadataRecord(String name)
      Deprecated.
      Description copied from interface: SharedBackend
      Gets the metadata of the specified name.
      Parameters:
      name - the name of the record
      Returns:
      the metadata DataRecord
    • getAllMetadataRecords

      public List<org.apache.jackrabbit.oak.spi.blob.data.DataRecord> getAllMetadataRecords(String prefix)
      Deprecated.
      Description copied from interface: SharedBackend
      Gets all the metadata with a specified prefix.
      Parameters:
      prefix - the prefix of the records to retrieve
      Returns:
      list of all the metadata DataRecords
    • deleteMetadataRecord

      public boolean deleteMetadataRecord(String name)
      Deprecated.
      Description copied from interface: SharedBackend
      Deletes the metadata record with the specified name
      Parameters:
      name - the name of the record
      Returns:
      boolean to indicate success of deletion
    • deleteAllMetadataRecords

      public void deleteAllMetadataRecords(String prefix)
      Deprecated.
      Description copied from interface: SharedBackend
      Deletes all the metadata records with the specified prefix.
      Parameters:
      prefix - the prefix of the record
    • metadataRecordExists

      public boolean metadataRecordExists(String name)
      Deprecated.
      Description copied from interface: SharedBackend
      Checks if the metadata record with the specified name exists.
      Parameters:
      name - the name of the record
      Returns:
      whether record exists
    • getAllRecords

      public Iterator<org.apache.jackrabbit.oak.spi.blob.data.DataRecord> getAllRecords()
      Deprecated.
      Description copied from interface: SharedBackend
      Returns a list of all DataRecords
      Returns:
      iterator over DataRecords
    • close

      public void close() throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from interface: SharedBackend
      Close backend and release resources like database connection if any.
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
    • getOrCreateReferenceKey

      public byte[] getOrCreateReferenceKey() throws org.apache.jackrabbit.oak.spi.blob.data.DataStoreException
      Deprecated.
      Description copied from class: AbstractSharedBackend
      Returns the reference key of this backend. If one does not already exist, it is automatically created in an implementation-specific way. The default implementation simply creates a temporary random key that's valid only until the data store gets restarted. Subclasses can override and/or decorate this method to support a more persistent reference key.

      This method is called only once during the lifetime of a backend instance and the return value is cached in memory, so it's no problem if the implementation is slow.

      Overrides:
      getOrCreateReferenceKey in class AbstractSharedBackend
      Returns:
      reference key
      Throws:
      org.apache.jackrabbit.oak.spi.blob.data.DataStoreException - if the key is not available
    • setProperties

      public void setProperties(Properties properties)
      Deprecated.
      Properties used to configure the backend. These are mandatorily to be provided explicitly before calling {init() is invoked.
      Parameters:
      properties - to configure Backend