org.xcmis.search.lucene.index
Class LuceneIndexTransaction

java.lang.Object
  extended by org.xcmis.search.lucene.index.LuceneIndexTransaction
All Implemented Interfaces:
IndexTransaction<org.apache.lucene.document.Document>
Direct Known Subclasses:
LoggedIndexTransactionImpl

public class LuceneIndexTransaction
extends Object
implements IndexTransaction<org.apache.lucene.document.Document>

Created by The eXo Platform SAS.

Version:
$Id: LuceneIndexTransaction.java 2 2010-02-04 17:21:49Z andrew00x $
Author:
Sergey Kabashnyuk

Constructor Summary
LuceneIndexTransaction(Map<String,org.apache.lucene.document.Document> addedDocuments, Set<String> deletedDocuments)
           
 
Method Summary
 IndexTransaction<org.apache.lucene.document.Document> apply(IndexTransactionModificationReport report)
          Remove modifications f
 Map<String,org.apache.lucene.document.Document> getAddedDocuments()
          Map of documents what should be added to index.
 long getAddedDocumentSizeInBytes()
          
 Set<String> getRemovedDocuments()
          Set of identifiers of documents what should be removed from index.
 boolean hasAddedDocuments()
           
 boolean hasModifacationsDocuments()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuceneIndexTransaction

public LuceneIndexTransaction(Map<String,org.apache.lucene.document.Document> addedDocuments,
                              Set<String> deletedDocuments)
Parameters:
addedDocuments -
updatedDocuments -
deletedDocuments -
storage - TODO
transactionLogDir -
Method Detail

apply

public IndexTransaction<org.apache.lucene.document.Document> apply(IndexTransactionModificationReport report)
Remove modifications f

Specified by:
apply in interface IndexTransaction<org.apache.lucene.document.Document>

getAddedDocuments

public Map<String,org.apache.lucene.document.Document> getAddedDocuments()
Map of documents what should be added to index.

Specified by:
getAddedDocuments in interface IndexTransaction<org.apache.lucene.document.Document>
Returns:
map of documents.

getAddedDocumentSizeInBytes

public long getAddedDocumentSizeInBytes()

Specified by:
getAddedDocumentSizeInBytes in interface IndexTransaction<org.apache.lucene.document.Document>
Returns:
size of transaction in bytes

getRemovedDocuments

public Set<String> getRemovedDocuments()
Set of identifiers of documents what should be removed from index.

Specified by:
getRemovedDocuments in interface IndexTransaction<org.apache.lucene.document.Document>
Returns:
set of identifiers.

hasAddedDocuments

public boolean hasAddedDocuments()
Specified by:
hasAddedDocuments in interface IndexTransaction<org.apache.lucene.document.Document>
Returns:
true if where is AddedDocuments

hasModifacationsDocuments

public boolean hasModifacationsDocuments()
Specified by:
hasModifacationsDocuments in interface IndexTransaction<org.apache.lucene.document.Document>
Returns:
true if where is UpdatedDocuments or RemovedDocuments


Copyright © 2011 eXo Platform SAS. All Rights Reserved.