Interface SegmentNodeStorePersistence
-
- All Known Implementing Classes:
AwsPersistence,AzurePersistence,AzurePersistenceV8,CachingPersistence,SplitPersistence,TarPersistence
public interface SegmentNodeStorePersistenceThis type is a main entry point for the segment node store persistence. It's used every time the access to the underlying storage (eg. tar files) is required.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SegmentArchiveManagercreateArchiveManager(boolean memoryMapping, boolean offHeapAccess, IOMonitor ioMonitor, FileStoreMonitor fileStoreMonitor, RemoteStoreMonitor remoteStoreMonitor)Opens a new archive manager.GCJournalFilegetGCJournalFile()Create theGCJournalFile.JournalFilegetJournalFile()Create theJournalFile.ManifestFilegetManifestFile()Create theManifestFile.RepositoryLocklockRepository()Acquire the lock on the repository.booleansegmentFilesExist()Check if the segment store already contains any segments
-
-
-
Method Detail
-
createArchiveManager
SegmentArchiveManager createArchiveManager(boolean memoryMapping, boolean offHeapAccess, IOMonitor ioMonitor, FileStoreMonitor fileStoreMonitor, RemoteStoreMonitor remoteStoreMonitor) throws IOException
Opens a new archive manager. It'll be used to access the archives containing segments.- Parameters:
memoryMapping- 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
- Throws:
IOException
-
segmentFilesExist
boolean segmentFilesExist()
Check if the segment store already contains any segments- Returns:
trueis some segments are available for reading
-
getJournalFile
JournalFile getJournalFile()
Create theJournalFile.- Returns:
- object representing the segment journal file
-
getGCJournalFile
GCJournalFile getGCJournalFile() throws IOException
Create theGCJournalFile.- Returns:
- object representing the GC journal file
- Throws:
IOException
-
getManifestFile
ManifestFile getManifestFile() throws IOException
Create theManifestFile.- Returns:
- object representing the manifest file
- Throws:
IOException
-
lockRepository
RepositoryLock lockRepository() throws IOException
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.- Returns:
- the acquired repository lock
- Throws:
IOException
-
-