Interface SharedDataStore
- 
- All Known Subinterfaces:
 BlobTrackingStore
- All Known Implementing Classes:
 AbstractSharedCachingDataStore,CachingFileDataStore,DataStoreBlobStore,OakFileDataStore
public interface SharedDataStoreInterface to be implemented by a shared data store. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSharedDataStore.TypeExplicitly identifies the type of the data store 
- 
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidaddMetadataRecord(java.io.File f, java.lang.String name)Adds the root record.voidaddMetadataRecord(java.io.InputStream stream, java.lang.String name)Adds the root record.voiddeleteAllMetadataRecords(java.lang.String prefix)Deletes all records matching the given prefix.booleandeleteMetadataRecord(java.lang.String name)Deletes the root record represented by the given parameters.java.util.List<DataRecord>getAllMetadataRecords(java.lang.String prefix)Gets the all root records.java.util.Iterator<DataRecord>getAllRecords()Retrieved an iterator over all DataRecords.DataRecordgetMetadataRecord(java.lang.String name)Retrieves the metadata record with the given nameDataRecordgetRecordForId(DataIdentifier id)Retrieves the record for the given identifierdefault @Nullable java.lang.StringgetRepositoryId()Returns the repository id (identifier for the repository in the DataStore)SharedDataStore.TypegetType()Gets the type.booleanmetadataRecordExists(java.lang.String name)Checks if the metadata record with the name existsdefault voidsetRepositoryId(java.lang.String repositoryId)Sets the repository id to identify repository in the DataStore 
 - 
 
- 
- 
Method Detail
- 
addMetadataRecord
void addMetadataRecord(java.io.InputStream stream, java.lang.String name) throws DataStoreExceptionAdds the root record.- Parameters:
 stream- the streamname- the name of the root record- Throws:
 DataStoreException- the data store exception
 
- 
addMetadataRecord
void addMetadataRecord(java.io.File f, java.lang.String name) throws DataStoreExceptionAdds the root record.- Parameters:
 f- the filename- the name of the root record- Throws:
 DataStoreException- the data store exception
 
- 
getMetadataRecord
DataRecord getMetadataRecord(java.lang.String name)
Retrieves the metadata record with the given name- Parameters:
 name- the name of the record- Returns:
 
 
- 
metadataRecordExists
boolean metadataRecordExists(java.lang.String name)
Checks if the metadata record with the name exists- Parameters:
 name-- Returns:
 
 
- 
getAllMetadataRecords
java.util.List<DataRecord> getAllMetadataRecords(java.lang.String prefix)
Gets the all root records.- Returns:
 - the all root records
 
 
- 
deleteMetadataRecord
boolean deleteMetadataRecord(java.lang.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(java.lang.String prefix)
Deletes all records matching the given prefix.- Parameters:
 prefix- metadata type identifier
 
- 
getAllRecords
java.util.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
SharedDataStore.Type getType()
Gets the type.- Returns:
 - the type
 
 
- 
getRepositoryId
@Nullable default @Nullable java.lang.String getRepositoryId()
Returns the repository id (identifier for the repository in the DataStore)- Returns:
 - repository id
 
 
- 
setRepositoryId
default void setRepositoryId(java.lang.String repositoryId) throws DataStoreExceptionSets the repository id to identify repository in the DataStore- Parameters:
 repositoryId-- Throws:
 DataStoreException
 
 - 
 
 -