net.sf.lucis.core
Interface Adder


@NotThreadSafe
public interface Adder

Document adder for full indexers. Implementations are not thread-safe.

Author:
Andres Rodriguez

Method Summary
 void add(Document document)
          Adds a document to the index.
 void add(Document document, Analyzer analyzer)
          Adds a document to the index.
 String getCheckpoint()
          Returns the current checkpoint.
 void setCheckpoint(String checkpoint)
          Sets the current checkpoint.
 void skip()
          Notifies the adder that the current run should be skipped.
 

Method Detail

getCheckpoint

String getCheckpoint()
                     throws InterruptedException
Returns the current checkpoint.

Returns:
The current checkpoint or null if no checkpoint is available.
Throws:
InterruptedException - if the current task has been interrupted.

setCheckpoint

void setCheckpoint(@Nullable
                   String checkpoint)
                   throws InterruptedException
Sets the current checkpoint.

Parameters:
checkpoint - New checkpoint.
Throws:
InterruptedException - if the current task has been interrupted.

skip

void skip()
          throws InterruptedException
Notifies the adder that the current run should be skipped.

Throws:
InterruptedException - if the current task has been interrupted.

add

void add(Document document)
         throws InterruptedException
Adds a document to the index.

Parameters:
document - Document to add.
Throws:
IndexException - if an error occurs.
InterruptedException - if the current task has been interrupted.

add

void add(Document document,
         Analyzer analyzer)
         throws InterruptedException
Adds a document to the index.

Parameters:
document - Document to add.
analyzer - Analzer to use.
Throws:
IndexException - if an error occurs.
InterruptedException - if the current task has been interrupted.


Copyright © 2013. All Rights Reserved.