net.sf.lucis.core.impl
Class ReindexingFSStore

java.lang.Object
  extended by net.sf.lucis.core.impl.ReindexingFSStore
All Implemented Interfaces:
DirectoryProvider, ReindexingStore

public class ReindexingFSStore
extends Object
implements ReindexingStore

File system-based reindexing store.

Author:
Andres Rodriguez

Constructor Summary
ReindexingFSStore(String indexDir)
           
 
Method Summary
 String getCheckpoint()
          Returns the current checkpoint.
 Directory getDestinationDirectory()
          Returns the directory in which the new index must be created.
 Directory getDirectory()
          Returns the underlying directory.
 IndexReader getManagedReader()
          Returns a managed index reader for the store.
 String getName()
          Returns the name of the object or the class name if no one was provided.
 Object getVersion()
          Returns the current version.
 void reindexed(String checkpoint)
          Called when a reindexing process has been completed.
 void setName(String name)
          Sets the object name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.lucis.core.DirectoryProvider
getManagedReader
 

Constructor Detail

ReindexingFSStore

public ReindexingFSStore(String indexDir)
Method Detail

getDirectory

public Directory getDirectory()
Description copied from interface: DirectoryProvider
Returns the underlying directory.

Specified by:
getDirectory in interface DirectoryProvider
Returns:
The directory used by the index.

getDestinationDirectory

public Directory getDestinationDirectory()
Description copied from interface: ReindexingStore
Returns the directory in which the new index must be created.

Specified by:
getDestinationDirectory in interface ReindexingStore
Returns:
The destitation directory.

getCheckpoint

public String getCheckpoint()
                     throws StoreException
Description copied from interface: ReindexingStore
Returns the current checkpoint.

Specified by:
getCheckpoint in interface ReindexingStore
Returns:
The current checkpoint or null if no checkpoint is available.
Throws:
StoreException

reindexed

public void reindexed(String checkpoint)
Description copied from interface: ReindexingStore
Called when a reindexing process has been completed.

Specified by:
reindexed in interface ReindexingStore
Parameters:
checkpoint - New index checkpoint.

getVersion

public Object getVersion()
Description copied from interface: DirectoryProvider
Returns the current version. Version objects are only tested for equality so no ordering is required. However they MUST obey equals and hashCode contracts.

Specified by:
getVersion in interface DirectoryProvider

getManagedReader

public final IndexReader getManagedReader()
                                   throws IOException
Description copied from interface: DirectoryProvider
Returns a managed index reader for the store.

Specified by:
getManagedReader in interface DirectoryProvider
Throws:
IOException

getName

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


setName

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



Copyright © 2013. All Rights Reserved.