com.sun.labs.minion
Interface MetaDataStore

All Known Implementing Classes:
MetaDataStoreImpl

public interface MetaDataStore

The MetaDataStore provides a mechanism to store name/value pairs in associate with an index. The search engine does not store any data of its own in the MetaDataStore. This service exists to allow applications that use the search engine to store a few values in the index directory in a safe way for the engine. Changes are persisted at the same time that the engine dumps in-memory data to disk.


Method Summary
 java.lang.String getProperty(java.lang.String name)
          Gets the value of the named property.
 java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
          Gets the value of the named property, or the default value if no value exists.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets a propery in the meta data store.
 

Method Detail

setProperty

void setProperty(java.lang.String name,
                 java.lang.String value)
Sets a propery in the meta data store. Changes are made consistent when the SearchEngine.flush() method is called.

Parameters:
name - the name of the property to set
value - the value of the named property

getProperty

java.lang.String getProperty(java.lang.String name)
Gets the value of the named property.

Parameters:
name - the property to retrieve
Returns:
the property value

getProperty

java.lang.String getProperty(java.lang.String name,
                             java.lang.String defaultValue)
Gets the value of the named property, or the default value if no value exists.

Parameters:
name - the property to retrieve
defaultValue - the default value to return if the property is not found
Returns:
the stored value or the default value