org.olat.search.service.indexer
Class FullIndexerStatus

java.lang.Object
  extended by org.olat.search.service.indexer.FullIndexerStatus

public class FullIndexerStatus
extends java.lang.Object

Status of full indexer.

Author:
Christian Guretzki

Field Summary
static java.lang.String STATUS_FINISHED
           
static java.lang.String STATUS_RUNNING
           
static java.lang.String STATUS_SLEEPING
           
static java.lang.String STATUS_STOPPED
           
 
Constructor Summary
FullIndexerStatus(int numberOfPartDocumentCounters)
           
 
Method Summary
 void addDocumentCount(int docCount)
           
 int getDocumentCount()
           
 java.lang.String getDocumentCounters()
           
 int getDocumentQueueSize()
           
 int getExcludedDocumentCount()
           
 java.lang.String getFileTypeCounters()
           
 java.lang.String getFullIndexStartedAt()
           
 long getIndexingTime()
           
 int getIndexPerMinute()
           
 int getIndexSize()
           
 java.lang.String getLastFullIndexTime()
           
 int getNumberAvailableFolderIndexer()
           
 int getNumberRunningFolderIndexer()
           
 java.lang.String getPartDocumentCounters()
           
 java.lang.String getStatus()
           
 void incrementDocumentCount()
           
 void incrementPartDocumentCount(int id)
           
 void indexingFinished()
          Indexing finished.
 void indexingStarted()
          Indexing started.
 void setDocumentCount(int documentCount)
           
 void setDocumentCounters(java.util.Map<java.lang.String,java.lang.Integer> documentCounters)
          Set new document-type counters Hashtable.
 void setDocumentQueueSize(int documentQueueSize)
          Set document queue size.
 void setFileTypeCounters(java.util.Map<java.lang.String,java.lang.Integer> fileTypeCounters)
          Set new file-type counters Hashtable.
 void setIndexPerMinute(int indexPerMinute)
           
 void setIndexSize(int indexSize)
           
 void setPartDocumentCount(int docCount, int id)
           
 void setStatus(java.lang.String status)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATUS_STOPPED

public static final java.lang.String STATUS_STOPPED
See Also:
Constant Field Values

STATUS_RUNNING

public static final java.lang.String STATUS_RUNNING
See Also:
Constant Field Values

STATUS_FINISHED

public static final java.lang.String STATUS_FINISHED
See Also:
Constant Field Values

STATUS_SLEEPING

public static final java.lang.String STATUS_SLEEPING
See Also:
Constant Field Values
Constructor Detail

FullIndexerStatus

public FullIndexerStatus(int numberOfPartDocumentCounters)
Method Detail

getIndexingTime

public long getIndexingTime()
Returns:
Returns the indexingTime.

getLastFullIndexTime

public java.lang.String getLastFullIndexTime()
Returns:
Returns the lastFullIndexTime.

getStatus

public java.lang.String getStatus()
Returns:
Returns the status.

getFullIndexStartedAt

public java.lang.String getFullIndexStartedAt()
Returns:
Returns the fullIndexStartedAt.

setStatus

public void setStatus(java.lang.String status)
Parameters:
status - The status to set.

indexingStarted

public void indexingStarted()
Indexing started. Set starting time, set status to 'running', reset full-index document-counter and all document-counters.


indexingFinished

public void indexingFinished()
Indexing finished. Set end time, calculate duration and set status to 'finished'.


getDocumentCount

public int getDocumentCount()

setDocumentCount

public void setDocumentCount(int documentCount)

incrementDocumentCount

public void incrementDocumentCount()

setIndexSize

public void setIndexSize(int indexSize)

getIndexSize

public int getIndexSize()

setIndexPerMinute

public void setIndexPerMinute(int indexPerMinute)

getIndexPerMinute

public int getIndexPerMinute()
Returns:
Return number of indexed elements in the las minute.

getNumberRunningFolderIndexer

public int getNumberRunningFolderIndexer()
Returns:
Returns the runningFolderIndexer.

getNumberAvailableFolderIndexer

public int getNumberAvailableFolderIndexer()
Returns:
Returns the availableFolderIndexer.

incrementPartDocumentCount

public void incrementPartDocumentCount(int id)

getPartDocumentCounters

public java.lang.String getPartDocumentCounters()

addDocumentCount

public void addDocumentCount(int docCount)

setPartDocumentCount

public void setPartDocumentCount(int docCount,
                                 int id)

setDocumentQueueSize

public void setDocumentQueueSize(int documentQueueSize)
Set document queue size. The queue is used in multi-threaded mode.


getDocumentQueueSize

public int getDocumentQueueSize()
Returns:
Return document queue size. The queue is used in multi-threaded mode.

setDocumentCounters

public void setDocumentCounters(java.util.Map<java.lang.String,java.lang.Integer> documentCounters)
Set new document-type counters Hashtable.

Parameters:
fileTypeCounters - New Hashtable with document-type-names as key and Integer-object as counters.

getDocumentCounters

public java.lang.String getDocumentCounters()
Returns:
Return HTML formatted text with document-type names and counter-values.

setFileTypeCounters

public void setFileTypeCounters(java.util.Map<java.lang.String,java.lang.Integer> fileTypeCounters)
Set new file-type counters Hashtable.

Parameters:
fileTypeCounters - New Hashtable with file-type-names as key and Integer-object as counters.

getFileTypeCounters

public java.lang.String getFileTypeCounters()
Returns:
Return HTML formatted text with file-type names and counter-values.

getExcludedDocumentCount

public int getExcludedDocumentCount()