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

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

public class RAMStore<T>
extends java.lang.Object
implements Store<T>

RAM-based store.

Author:
Andres Rodriguez

Constructor Summary
RAMStore()
           
RAMStore(Store<T> store)
           
 
Method Summary
 T getCheckpoint()
          Returns the current checkpoint.
 org.apache.lucene.store.Directory getDirectory()
          Returns the underlying directory.
 java.lang.Object getVersion()
          Returns the current version.
 void setCheckpoint(T checkpoint)
          Sets the current checkpoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RAMStore

public RAMStore(Store<T> store)
         throws java.lang.Exception
Throws:
java.lang.Exception

RAMStore

public RAMStore()
Method Detail

getDirectory

public org.apache.lucene.store.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.

getVersion

public java.lang.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

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.


Copyright © 2009. All Rights Reserved.