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

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

public class ExpirationTimeDeletionPolicy
extends Object
implements IndexDeletionPolicy, DirectoryConfigurable, CompassConfigurable

An index deletion policy that keeps all commits that have not expired. Expiration time (in seconds) can be set using LuceneEnvironment.IndexDeletionPolicy.ExpirationTime settings.

Author:
kimchy
See Also:
IndexDeletionPolicyFactory

Constructor Summary
ExpirationTimeDeletionPolicy()
           
 
Method Summary
 void configure(CompassSettings settings)
          Configure using the given settings.
 void onCommit(List commits)
           
 void onInit(List commits)
           
 void setDirectory(Directory directory)
          IndexDeletionPolicy that implement this interface will be injected with a Directory implementation to be used.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpirationTimeDeletionPolicy

public ExpirationTimeDeletionPolicy()
Method Detail

setDirectory

public void setDirectory(Directory directory)
Description copied from interface: DirectoryConfigurable
IndexDeletionPolicy that implement this interface will be injected with a Directory implementation to be used.

The directory will be injected just after construction and before any of IndexDeletionPolicy methods will be called.

Specified by:
setDirectory in interface DirectoryConfigurable

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)
            throws IOException
Specified by:
onInit in interface IndexDeletionPolicy
Throws:
IOException

onCommit

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


Copyright (c) 2004-2006 The Compass Project.