net.sf.lucis.core.impl
Class FSStore<T>

java.lang.Object
  extended by net.sf.lucis.core.impl.FSStore<T>
Type Parameters:
T - Checkpoint type.
All Implemented Interfaces:
DirectoryProvider, Store<T>

public class FSStore<T>
extends Object
implements Store<T>

File system-based store.

Author:
Andres Rodriguez

Constructor Summary
FSStore(Checkpoint<T> serializer, String indexDir)
           
 
Method Summary
 T getCheckpoint()
          Returns the current checkpoint.
 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 setCheckpoint(T checkpoint)
          Sets the current checkpoint.
 void setName(String name)
          Sets the object name.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.lucis.core.DirectoryProvider
getManagedReader
 

Constructor Detail

FSStore

public FSStore(Checkpoint<T> serializer,
               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.

getCheckpoint

public T getCheckpoint()
Description copied from interface: Store
Returns the current checkpoint.

Specified by:
getCheckpoint in interface Store<T>
Returns:
The current checkpoint.

setCheckpoint

public void setCheckpoint(T checkpoint)
Description copied from interface: Store
Sets the current checkpoint.

Specified by:
setCheckpoint in interface Store<T>
Parameters:
checkpoint - Checkpoint to set. Must not be null.

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

toString

public String toString()
Overrides:
toString in class Object

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.