public interface LuceneIndexSnapshotManager
Modifier and Type | Method and Description |
---|---|
LuceneIndexSnapshot |
create(JournalIdentifier journalIdentifier)
Create a new Lucene index snapshot for given journal (index)
|
void |
delete(LuceneIndexSnapshot snapshot)
Delete an index snapshot from file system.
|
Optional<LuceneIndexSnapshot> |
find(JournalIdentifier journalIdentifier,
long journalEntryId)
Find a specific index snapshot corresponding to a journal entry ID.
|
Optional<LuceneIndexSnapshot> |
find(JournalIdentifier journalIdentifier,
long journalEntryId,
long waitTimeMs)
Find a specific index snapshot corresponding to a journal entry ID.
|
List<LuceneIndexSnapshot> |
findForJournal(JournalIdentifier journalIdentifier) |
Optional<Path> |
getFile(LuceneIndexSnapshot snapshot)
Obtain location of an index snapshot.
|
void |
restore(LuceneIndexSnapshot luceneIndexSnapshot)
Restore a Lucene snapshot for given journal (index) to the current node
|
LuceneIndexSnapshot create(JournalIdentifier journalIdentifier)
journalIdentifier
- Identifier of a journal of which a snapshot will be createdgetFile(LuceneIndexSnapshot)
LuceneIndexSnapshotException
- if there is error creating the snapshot e.g. not enough spacevoid restore(LuceneIndexSnapshot luceneIndexSnapshot)
luceneIndexSnapshot
- snapshot to restoreLuceneIndexSnapshotException
- if there is not enough space or any error restoring from the snapshotList<LuceneIndexSnapshot> findForJournal(JournalIdentifier journalIdentifier)
Optional<LuceneIndexSnapshot> find(JournalIdentifier journalIdentifier, long journalEntryId)
find(JournalIdentifier, long, long)
journalIdentifier
- Identifier of a journal of which a snapshot will be createdjournalEntryId
- place in journal when snapshot was createdOptional<LuceneIndexSnapshot> find(JournalIdentifier journalIdentifier, long journalEntryId, long waitTimeMs) throws InterruptedException
journalIdentifier
- Identifier of a journal of which a snapshot will be createdjournalEntryId
- place in journal when snapshot was createdwaitTimeMs
- max time to wait until the snapshot file is availablewaitTimeMs
or emptyInterruptedException
void delete(LuceneIndexSnapshot snapshot) throws IOException
snapshot
- The snapshot to be deletedIOException
- If there is error deleting the snapshot fileOptional<Path> getFile(LuceneIndexSnapshot snapshot)
snapshot
- Index snapshot to be accessedCopyright © 2003–2020 Atlassian. All rights reserved.