Interface SharedDataStore

All Known Subinterfaces:
BlobTrackingStore
All Known Implementing Classes:
AbstractSharedCachingDataStore, AzureDataStore, CachingFileDataStore, DataStoreBlobStore, DummyDataStore, OakFileDataStore, S3DataStore

public interface SharedDataStore
Interface to be implemented by a shared data store.
  • Method Details

    • addMetadataRecord

      void addMetadataRecord(InputStream stream, String name) throws DataStoreException
      Adds the root record.
      Parameters:
      stream - the stream
      name - the name of the root record
      Throws:
      DataStoreException - the data store exception
    • addMetadataRecord

      void addMetadataRecord(File f, String name) throws DataStoreException
      Adds the root record.
      Parameters:
      f - the file
      name - the name of the root record
      Throws:
      DataStoreException - the data store exception
    • getMetadataRecord

      DataRecord getMetadataRecord(String name)
      Retrieves the metadata record with the given name
      Parameters:
      name - the name of the record
      Returns:
    • metadataRecordExists

      boolean metadataRecordExists(String name)
      Checks if the metadata record with the name exists
      Parameters:
      name -
      Returns:
    • getAllMetadataRecords

      List<DataRecord> getAllMetadataRecords(String prefix)
      Gets the all root records.
      Returns:
      the all root records
    • deleteMetadataRecord

      boolean deleteMetadataRecord(String name)
      Deletes the root record represented by the given parameters.
      Parameters:
      name - the name of the root record
      Returns:
      success/failure
    • deleteAllMetadataRecords

      void deleteAllMetadataRecords(String prefix)
      Deletes all records matching the given prefix.
      Parameters:
      prefix - metadata type identifier
    • getAllRecords

      Iterator<DataRecord> getAllRecords() throws DataStoreException
      Retrieved an iterator over all DataRecords.
      Returns:
      iterator over DataRecords
      Throws:
      DataStoreException
    • getRecordForId

      DataRecord getRecordForId(DataIdentifier id) throws DataStoreException
      Retrieves the record for the given identifier
      Parameters:
      id - the if of the record
      Returns:
      data record
      Throws:
      DataStoreException
    • getType

      Gets the type.
      Returns:
      the type
    • getRepositoryId

      @Nullable default @Nullable String getRepositoryId()
      Returns the repository id (identifier for the repository in the DataStore)
      Returns:
      repository id
    • setRepositoryId

      default void setRepositoryId(String repositoryId) throws DataStoreException
      Sets the repository id to identify repository in the DataStore
      Parameters:
      repositoryId -
      Throws:
      DataStoreException