public class CachingPersistence extends java.lang.Object implements SegmentNodeStorePersistence
Constructor and Description |
---|
CachingPersistence(PersistentCache persistentCache,
SegmentNodeStorePersistence delegate) |
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 CachingPersistence(PersistentCache persistentCache, SegmentNodeStorePersistence delegate)
public SegmentArchiveManager createArchiveManager(boolean memoryMapping, boolean offHeapAccess, IOMonitor ioMonitor, FileStoreMonitor fileStoreMonitor, RemoteStoreMonitor remoteStoreMonitor) throws java.io.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.java.io.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 java.io.IOException
SegmentNodeStorePersistence
GCJournalFile
.getGCJournalFile
in interface SegmentNodeStorePersistence
java.io.IOException
public ManifestFile getManifestFile() throws java.io.IOException
SegmentNodeStorePersistence
ManifestFile
.getManifestFile
in interface SegmentNodeStorePersistence
java.io.IOException
public RepositoryLock lockRepository() throws java.io.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
java.io.IOException
Copyright © 2012–2022 The Apache Software Foundation. All rights reserved.