|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.solr.core.IndexDeletionPolicyWrapper
public class IndexDeletionPolicyWrapper
A wrapper for an IndexDeletionPolicy instance.
Provides features for looking up IndexCommit given a version. Allows reserving index commit points for certain amounts of time to support features such as index replication or snapshooting directly out of a live index directory.
IndexDeletionPolicy| Constructor Summary | |
|---|---|
IndexDeletionPolicyWrapper(org.apache.lucene.index.IndexDeletionPolicy deletionPolicy)
|
|
| Method Summary | |
|---|---|
org.apache.lucene.index.IndexCommit |
getCommitPoint(Long version)
|
Map<Long,org.apache.lucene.index.IndexCommit> |
getCommits()
Gets the commit points for the index. |
org.apache.lucene.index.IndexCommit |
getLatestCommit()
Gets the most recent commit point It is recommended to reserve a commit point for the duration of usage so that it is not deleted by the underlying deletion policy |
org.apache.lucene.index.IndexDeletionPolicy |
getWrappedDeletionPolicy()
|
void |
onCommit(List list)
Internal use for Lucene... |
void |
onInit(List list)
Internal use for Lucene... |
void |
releaseCommitPoint(Long indexCommitVersion)
Release a previously saved commit point |
void |
saveCommitPoint(Long indexCommitVersion)
Permanently prevent this commit point from being deleted. |
void |
setReserveDuration(Long indexVersion,
long reserveTime)
Set the duration for which commit point is to be reserved by the deletion policy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IndexDeletionPolicyWrapper(org.apache.lucene.index.IndexDeletionPolicy deletionPolicy)
| Method Detail |
|---|
public org.apache.lucene.index.IndexCommit getLatestCommit()
public org.apache.lucene.index.IndexDeletionPolicy getWrappedDeletionPolicy()
public void setReserveDuration(Long indexVersion,
long reserveTime)
indexVersion - version of the commit point to be reservedreserveTime - time in milliseconds for which the commit point is to be reservedpublic void saveCommitPoint(Long indexCommitVersion)
public void releaseCommitPoint(Long indexCommitVersion)
public void onInit(List list)
throws IOException
onInit in interface org.apache.lucene.index.IndexDeletionPolicyIOException
public void onCommit(List list)
throws IOException
onCommit in interface org.apache.lucene.index.IndexDeletionPolicyIOExceptionpublic org.apache.lucene.index.IndexCommit getCommitPoint(Long version)
version - the version of the commit point
public Map<Long,org.apache.lucene.index.IndexCommit> getCommits()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||