Class AzurePersistence
- java.lang.Object
-
- org.apache.jackrabbit.oak.segment.azure.AzurePersistence
-
- All Implemented Interfaces:
SegmentNodeStorePersistence
public class AzurePersistence extends Object implements SegmentNodeStorePersistence
-
-
Field Summary
Fields Modifier and Type Field Description protected AzureHttpRequestLoggingPolicy
azureHttpRequestLoggingPolicy
protected com.azure.storage.blob.BlobContainerClient
noRetryBlobContainerClient
protected com.azure.storage.blob.BlobContainerClient
readBlobContainerClient
protected String
rootPrefix
protected WriteAccessController
writeAccessController
protected com.azure.storage.blob.BlobContainerClient
writeBlobContainerClient
-
Constructor Summary
Constructors Constructor Description AzurePersistence(com.azure.storage.blob.BlobContainerClient readBlobContainerClient, com.azure.storage.blob.BlobContainerClient writeBlobContainerClient, com.azure.storage.blob.BlobContainerClient noRetryBlobContainerClient, String rootPrefix)
AzurePersistence(com.azure.storage.blob.BlobContainerClient readBlobContainerClient, com.azure.storage.blob.BlobContainerClient writeBlobContainerClient, com.azure.storage.blob.BlobContainerClient noRetryBlobContainerClient, String rootPrefix, AzureHttpRequestLoggingPolicy azureHttpRequestLoggingPolicy)
AzurePersistence(com.azure.storage.blob.BlobContainerClient blobContainerClient, String rootPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SegmentArchiveManager
createArchiveManager(boolean mmap, boolean offHeapAccess, IOMonitor ioMonitor, FileStoreMonitor fileStoreMonitor, RemoteStoreMonitor remoteStoreMonitor)
Opens a new archive manager.GCJournalFile
getGCJournalFile()
Create theGCJournalFile
.JournalFile
getJournalFile()
Create theJournalFile
.ManifestFile
getManifestFile()
Create theManifestFile
.com.azure.storage.blob.BlobContainerClient
getReadBlobContainerClient()
RepositoryLock
lockRepository()
Acquire the lock on the repository.boolean
segmentFilesExist()
Check if the segment store already contains any segmentsvoid
setWriteAccessController(WriteAccessController writeAccessController)
-
-
-
Field Detail
-
readBlobContainerClient
protected final com.azure.storage.blob.BlobContainerClient readBlobContainerClient
-
writeBlobContainerClient
protected final com.azure.storage.blob.BlobContainerClient writeBlobContainerClient
-
noRetryBlobContainerClient
protected final com.azure.storage.blob.BlobContainerClient noRetryBlobContainerClient
-
rootPrefix
protected final String rootPrefix
-
azureHttpRequestLoggingPolicy
protected AzureHttpRequestLoggingPolicy azureHttpRequestLoggingPolicy
-
writeAccessController
protected WriteAccessController writeAccessController
-
-
Constructor Detail
-
AzurePersistence
public AzurePersistence(com.azure.storage.blob.BlobContainerClient blobContainerClient, String rootPrefix)
-
AzurePersistence
public AzurePersistence(com.azure.storage.blob.BlobContainerClient readBlobContainerClient, com.azure.storage.blob.BlobContainerClient writeBlobContainerClient, com.azure.storage.blob.BlobContainerClient noRetryBlobContainerClient, String rootPrefix)
-
AzurePersistence
public AzurePersistence(com.azure.storage.blob.BlobContainerClient readBlobContainerClient, com.azure.storage.blob.BlobContainerClient writeBlobContainerClient, com.azure.storage.blob.BlobContainerClient noRetryBlobContainerClient, String rootPrefix, AzureHttpRequestLoggingPolicy azureHttpRequestLoggingPolicy)
-
-
Method Detail
-
createArchiveManager
public SegmentArchiveManager createArchiveManager(boolean mmap, boolean offHeapAccess, IOMonitor ioMonitor, FileStoreMonitor fileStoreMonitor, RemoteStoreMonitor remoteStoreMonitor)
Description copied from interface:SegmentNodeStorePersistence
Opens a new archive manager. It'll be used to access the archives containing segments.- Specified by:
createArchiveManager
in interfaceSegmentNodeStorePersistence
- Parameters:
mmap
- whether the memory mapping should be used (if the given persistence supports it)offHeapAccess
- whether off heap access for segments should be usedioMonitor
- object used to monitor segment-related IO access. The implementation should call the appropriate methods when accessing segments.fileStoreMonitor
- object used to monitor the general IO usage.- Returns:
- segment archive manager
-
segmentFilesExist
public boolean segmentFilesExist()
Description copied from interface:SegmentNodeStorePersistence
Check if the segment store already contains any segments- Specified by:
segmentFilesExist
in interfaceSegmentNodeStorePersistence
- Returns:
true
is some segments are available for reading
-
getJournalFile
public JournalFile getJournalFile()
Description copied from interface:SegmentNodeStorePersistence
Create theJournalFile
.- Specified by:
getJournalFile
in interfaceSegmentNodeStorePersistence
- Returns:
- object representing the segment journal file
-
getGCJournalFile
public GCJournalFile getGCJournalFile() throws IOException
Description copied from interface:SegmentNodeStorePersistence
Create theGCJournalFile
.- Specified by:
getGCJournalFile
in interfaceSegmentNodeStorePersistence
- Returns:
- object representing the GC journal file
- Throws:
IOException
-
getManifestFile
public ManifestFile getManifestFile() throws IOException
Description copied from interface:SegmentNodeStorePersistence
Create theManifestFile
.- Specified by:
getManifestFile
in interfaceSegmentNodeStorePersistence
- Returns:
- object representing the manifest file
- Throws:
IOException
-
lockRepository
public RepositoryLock lockRepository() throws IOException
Description copied from interface:SegmentNodeStorePersistence
Acquire the lock on the repository. During the lock lifetime it shouldn't be possible to acquire it again, either by a local or by a remote process.The lock can be released manually by calling
RepositoryLock.unlock()
. If the segment node store is shut down uncleanly (eg. the process crashes), it should be released automatically, so no extra maintenance tasks are required to run the process again.- Specified by:
lockRepository
in interfaceSegmentNodeStorePersistence
- Returns:
- the acquired repository lock
- Throws:
IOException
-
getReadBlobContainerClient
public com.azure.storage.blob.BlobContainerClient getReadBlobContainerClient()
-
setWriteAccessController
public void setWriteAccessController(WriteAccessController writeAccessController)
-
-