Class AbstractSharedBackend
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
-
- All Implemented Interfaces:
SharedBackend
- Direct Known Subclasses:
AzureBlobStoreBackend
,FSBackend
,S3Backend
public abstract class AbstractSharedBackend extends Object implements SharedBackend
-
-
Constructor Summary
Constructors Constructor Description AbstractSharedBackend()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
getOrCreateReferenceKey()
Returns the reference key of this backend.protected String
getReferenceFromIdentifier(DataIdentifier identifier)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.jackrabbit.oak.spi.blob.SharedBackend
addMetadataRecord, addMetadataRecord, close, deleteAllMetadataRecords, deleteMetadataRecord, deleteRecord, exists, getAllIdentifiers, getAllMetadataRecords, getAllRecords, getMetadataRecord, getRecord, init, metadataRecordExists, read, write
-
-
-
-
Method Detail
-
getReferenceFromIdentifier
protected String getReferenceFromIdentifier(DataIdentifier identifier)
-
getOrCreateReferenceKey
public byte[] getOrCreateReferenceKey() throws DataStoreException
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.
- Returns:
- reference key
- Throws:
DataStoreException
- if the key is not available
-
-