| java.lang.Object com.sun.portal.search.db.SearchOnlyDb
All known Subclasses: com.sun.portal.search.db.TaxonomyDb,
SearchOnlyDb | public class SearchOnlyDb implements RDMDb(Code) | | SOIF Database API
- handles SOIF db i/o
- provides a template for similar, non-SOIF layers, eg, XML, etc.
- hides db implementation details (eg, db might not contain SOIF)
- hides the mechanics of P/NP data
|
Method Summary | |
public void | admin(SToken st, String cmd) | public void | close(SToken st) | public int | count(SToken st, RDMTransaction t) Number of docs. | public static void | create(SToken st, String rootdir, String dbname, String parts) Create a new db with the given name, partitions and indexes. | public void | create1(SToken st, String rootdir, String dbname, String[] parts) Create a new db with the given name, partitions and indexes. | public void | delete(SToken st, SOIF insoif, int flags, RDMTransaction t) | public void | delete(SToken st, SOIF s, Set view, int flags, RDMTransaction t) Delete a SOIF stream. | public void | delete(SToken st, Datum key, int flags, RDMTransaction t) Delete - creates a transaction for atomic indexing, if none supplied. | public static void | drop(SToken st, String rootdir, String dbname) Delete the named db. | public void | drop1(SToken st, String rootdir, String dbname) Delete the named db. | public int | fetch(SToken st, Datum key, Datum result, int flags, RDMTransaction t) Returns 0 if present, or Db.DB_NOTFOUND or DBb.DB_KEYEMPTY (for missing recno key)
If result is null, simply checks for presence of key in db. | public SOIF | fetch(SToken st, String url, Set view, int flags, RDMTransaction t) | public SOIF | fetch(SToken st, String url, int flags, RDMTransaction t) | public String | getName() | public Set | getSupportedDataTypes(SToken st) | public Set | getSupportedQueryLanguages(SToken st) | public void | housekeep() Housekeep the db - general servicing, clean log files, create checkpoints, etc. | public void | indexBatch(SToken st) | public void | open(SToken st, String rootdir, String dbname, int rw, int mode) | public void | optimize(SToken st) | public int | purge(SToken st, RDMTransaction t) | public void | recover(SToken st, String dbhome, boolean fatal) | public RDMResultSet | search(SToken st, String query, int numHits, Set view, String sortOrder, RDMTransaction t) | public void | setIndexBatchSize(SToken st, int n) | public void | store(SToken st, SOIF insoif, Set view, int flags, RDMTransaction t) | public void | store(SToken st, Datum key, Datum newdata, int flags, RDMTransaction t) Store - creates a transaction for atomic indexing, if none supplied. | public void | store(SToken st, SOIF soif, int flags, RDMTransaction t) | public void | update(SToken st, SOIF insoif, Set view, int flags, RDMTransaction t) |
create | public static void create(SToken st, String rootdir, String dbname, String parts) throws RDMException(Code) | | Create a new db with the given name, partitions and indexes.
Parameters: st - Security token for access control Parameters: rootdir - db home dir Parameters: dbname - logical database name Parameters: parts - database partitions Parameters: index - db index data throws: RDMException - |
create1 | public void create1(SToken st, String rootdir, String dbname, String[] parts) throws RDMException(Code) | | Create a new db with the given name, partitions and indexes.
Parameters: st - Security token for access control Parameters: rootdir - db home dir Parameters: dbname - logical database name Parameters: parts - database partitions throws: RDMException - |
fetch | public int fetch(SToken st, Datum key, Datum result, int flags, RDMTransaction t) throws RDMException(Code) | | Returns 0 if present, or Db.DB_NOTFOUND or DBb.DB_KEYEMPTY (for missing recno key)
If result is null, simply checks for presence of key in db.
Parameters: st - Parameters: key - Parameters: result - Parameters: flags - Parameters: t - throws: RDMException - |
getSupportedDataTypes | public Set getSupportedDataTypes(SToken st) throws RDMException(Code) | | Data type support XXX - or leave this up to the client(or server)?
|
getSupportedQueryLanguages | public Set getSupportedQueryLanguages(SToken st) throws RDMException(Code) | | Query language support
Parameters: st - throws: RDMException - Set of supported query languages (String) |
housekeep | public void housekeep() throws RDMException(Code) | | Housekeep the db - general servicing, clean log files, create checkpoints, etc.
|
open | public void open(SToken st, String rootdir, String dbname, int rw, int mode) throws RDMException(Code) | | open -- Opens a database
- rootdir -- db home dir
- dbname -- name of database from root.db (e.g., default)
- rw -- RDMDb.WRITER or RDMDb.WRCREAT or RDMDb.READER
- mode -- Unix mode
|
recover | public void recover(SToken st, String dbhome, boolean fatal) throws RDMException(Code) | | Recover the db - must be run stand alone (ie, no one else has the db open)
|
|
|