public class SplitPersistence extends Object implements SegmentNodeStorePersistence
Constructor and Description |
---|
SplitPersistence(SegmentNodeStorePersistence roPersistence,
SegmentNodeStorePersistence rwPersistence) |
Modifier and Type | Method and Description |
---|---|
SegmentArchiveManager |
createArchiveManager(boolean memoryMapping,
boolean offHeapAccess,
IOMonitor ioMonitor,
FileStoreMonitor fileStoreMonitor,
RemoteStoreMonitor remoteStoreMonitor)
Opens a new archive manager.
|
GCJournalFile |
getGCJournalFile()
Create the
GCJournalFile . |
JournalFile |
getJournalFile()
Create the
JournalFile . |
ManifestFile |
getManifestFile()
Create the
ManifestFile . |
RepositoryLock |
lockRepository()
Acquire the lock on the repository.
|
boolean |
segmentFilesExist()
Check if the segment store already contains any segments
|
public SplitPersistence(SegmentNodeStorePersistence roPersistence, SegmentNodeStorePersistence rwPersistence) throws IOException
IOException
public SegmentArchiveManager createArchiveManager(boolean memoryMapping, boolean offHeapAccess, IOMonitor ioMonitor, FileStoreMonitor fileStoreMonitor, RemoteStoreMonitor remoteStoreMonitor) throws IOException
SegmentNodeStorePersistence
createArchiveManager
in interface SegmentNodeStorePersistence
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.IOException
public boolean segmentFilesExist()
SegmentNodeStorePersistence
segmentFilesExist
in interface SegmentNodeStorePersistence
true
is some segments are available for readingpublic JournalFile getJournalFile()
SegmentNodeStorePersistence
JournalFile
.getJournalFile
in interface SegmentNodeStorePersistence
public GCJournalFile getGCJournalFile() throws IOException
SegmentNodeStorePersistence
GCJournalFile
.getGCJournalFile
in interface SegmentNodeStorePersistence
IOException
public ManifestFile getManifestFile() throws IOException
SegmentNodeStorePersistence
ManifestFile
.getManifestFile
in interface SegmentNodeStorePersistence
IOException
public RepositoryLock lockRepository() throws IOException
SegmentNodeStorePersistence
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.
lockRepository
in interface SegmentNodeStorePersistence
IOException
Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.