org.compass.core.lucene.engine.indexdeletionpolicy
Class KeepLastNDeletionPolicy

java.lang.Object
  extended by org.compass.core.lucene.engine.indexdeletionpolicy.KeepLastNDeletionPolicy
All Implemented Interfaces:
IndexDeletionPolicy, CompassConfigurable

public class KeepLastNDeletionPolicy
extends Object
implements IndexDeletionPolicy, CompassConfigurable

An index deletion policy that keepds the last "N" commits. Configured using LuceneEnvironment.IndexDeletionPolicy.KeepLastN settings with the number of last commits to save. Defaults to 10.

Author:
kimchy
See Also:
IndexDeletionPolicyFactory

Constructor Summary
KeepLastNDeletionPolicy()
           
 
Method Summary
 void configure(CompassSettings settings)
          Configure using the given settings.
 void onCommit(List commits)
           
 void onInit(List commits)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeepLastNDeletionPolicy

public KeepLastNDeletionPolicy()
Method Detail

configure

public void configure(CompassSettings settings)
               throws CompassException
Description copied from interface: CompassConfigurable
Configure using the given settings.

Specified by:
configure in interface CompassConfigurable
Parameters:
settings - The settings for the configured object
Throws:
CompassException

onInit

public void onInit(List commits)
Specified by:
onInit in interface IndexDeletionPolicy

onCommit

public void onCommit(List commits)
Specified by:
onCommit in interface IndexDeletionPolicy

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2004-2008 The Compass Project.