Class AbstractSharedBackend
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.blob.AbstractSharedBackend
-
- All Implemented Interfaces:
SharedBackend
- Direct Known Subclasses:
FSBackend
public abstract class AbstractSharedBackend extends java.lang.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.-
Methods inherited from class java.lang.Object
equals, 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
-
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
-
-