net.conquiris.index
Class AbstractLocalIndexerService

java.lang.Object
  extended by net.conquiris.index.AbstractLocalIndexerService
All Implemented Interfaces:
IndexActiveFlag, IndexerService, IndexStartedFlag, IndexStatusProperty, LocalIndexerService
Direct Known Subclasses:
DirectoryIndexerService

public abstract class AbstractLocalIndexerService
extends Object
implements LocalIndexerService

Abstract base class for a LocalIndexerService. Includes the convenience methods.

Author:
Andres Rodriguez.

Field Summary
 
Fields inherited from interface net.conquiris.api.index.IndexStatusProperty
INDEX_STATUS
 
Fields inherited from interface net.conquiris.api.index.IndexStartedFlag
INDEX_STARTED
 
Fields inherited from interface net.conquiris.api.index.IndexActiveFlag
INDEX_ACTIVE
 
Constructor Summary
protected AbstractLocalIndexerService()
          Constructor.
 
Method Summary
protected  net.derquinse.common.log.ContextLog baseLog()
          Returns the base log to use.
 Delays getDelays()
           
 IndexReport getIndexReport(IndexReportLevel level)
           
 String getName()
          Returns the name of the service or the class name if no one was provided.
 boolean isIndexActive()
           
protected  net.derquinse.common.log.ContextLog log()
          Returns the context log to use for the index service.
protected  String logContextFormat()
          Returns the format to use for the service log context.
 void setActivationPolicy(IndexerActivationPolicy activationPolicy)
          Sets the activation policy.
 void setDelays(Delays delays)
           
 void setName(String name)
          Sets the object name.
protected  net.derquinse.common.log.ContextLog writerLog()
          Returns the context log to use for the index writer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.conquiris.api.index.LocalIndexerService
getIndexInfo, getIndexStatus
 
Methods inherited from interface net.conquiris.api.index.IndexerService
reindex, setCheckpoint, start, stop
 
Methods inherited from interface net.conquiris.api.index.IndexStartedFlag
isIndexStarted
 

Constructor Detail

AbstractLocalIndexerService

protected AbstractLocalIndexerService()
Constructor.

Method Detail

getIndexReport

public final IndexReport getIndexReport(IndexReportLevel level)
Specified by:
getIndexReport in interface IndexerService

getDelays

public final Delays getDelays()
Specified by:
getDelays in interface LocalIndexerService

setDelays

public final void setDelays(Delays delays)
Specified by:
setDelays in interface IndexerService

isIndexActive

public final boolean isIndexActive()
Specified by:
isIndexActive in interface IndexActiveFlag

setActivationPolicy

public void setActivationPolicy(@Nullable
                                IndexerActivationPolicy activationPolicy)
Sets the activation policy.

Parameters:
activationPolicy - Policy to use. If null an always active policy will be used.

getName

public final String getName()
Returns the name of the service or the class name if no one was provided.


setName

public final void setName(String name)
Sets the object name.


logContextFormat

protected String logContextFormat()
Returns the format to use for the service log context. Must include exactly one string parameter for the service name.


baseLog

protected net.derquinse.common.log.ContextLog baseLog()
Returns the base log to use.


log

protected final net.derquinse.common.log.ContextLog log()
Returns the context log to use for the index service.


writerLog

protected final net.derquinse.common.log.ContextLog writerLog()
Returns the context log to use for the index writer.



Copyright © 2012 Derquinse Projects.. All Rights Reserved.