Xindice API
version 1.1

org.apache.xindice.core.filer
Interface Filer

All Superinterfaces:
Configurable, DBObject, Named
All Known Implementing Classes:
MemFiler, SizeableMemFiler, BTreeFiler, HashFiler, FSFiler

public interface Filer
extends Named, DBObject, Configurable

Filer is the low-level file management interface for Xindice. A Filer object is implemented in order to provide a data source to the Xindice Collection class. Filers are developed to perform transparent storage and retrieval to and from heterogenous data sources (such as FTP, HTTP, RDBMS, etc...)

Version:
$Revision: 511426 $, $Date: 2007-02-24 22:25:02 -0500 (Sat, 24 Feb 2007) $

Method Summary
 boolean deleteRecord(Key key)
          deleteRecord removes a Record from the Filer based on the specified Key.
 void flush()
          flush forcefully flushes any unwritten buffers to disk.
 long getRecordCount()
          getRecordCount returns the number of Records in the Filer.
 RecordSet getRecordSet()
          getRecordSet returns a RecordSet object for the current Filer.
 Record readRecord(Key key)
          readRecord returns a Record from the Filer based on the specified Key.
 void setLocation(File root, String location)
          setLocation tells the Filer where to store its data.
 boolean writeRecord(Key key, Value value)
          writeRecord writes a Value to the Filer based on the specified Key.
 
Methods inherited from interface org.apache.xindice.util.Named
getName
 
Methods inherited from interface org.apache.xindice.core.DBObject
close, create, drop, exists, isOpened, open
 
Methods inherited from interface org.apache.xindice.util.Configurable
getConfig, setConfig
 

Method Detail

setLocation

public void setLocation(File root,
                        String location)
setLocation tells the Filer where to store its data.
Parameters:
root - The root under which to store data
location - The name to use for storing data

readRecord

public Record readRecord(Key key)
                  throws DBException
readRecord returns a Record from the Filer based on the specified Key.
Parameters:
key - The Record's Key
Returns:
The returned Record

writeRecord

public boolean writeRecord(Key key,
                           Value value)
                    throws DBException
writeRecord writes a Value to the Filer based on the specified Key.
Parameters:
key - The Record's Key
value - The Record's Value
Returns:
Whether or not the Record could be written

deleteRecord

public boolean deleteRecord(Key key)
                     throws DBException
deleteRecord removes a Record from the Filer based on the specified Key.
Parameters:
key - The Record's Key
Returns:
Whether or not the Record was deleted

getRecordCount

public long getRecordCount()
                    throws DBException
getRecordCount returns the number of Records in the Filer.
Returns:
The Record count

getRecordSet

public RecordSet getRecordSet()
                       throws DBException
getRecordSet returns a RecordSet object for the current Filer.
Returns:
The Filer Enumerator

flush

public void flush()
           throws DBException
flush forcefully flushes any unwritten buffers to disk.

Xindice API
version 1.1

Copyright (c) 1999-2007 The Apache Software Foundation. All Rights Reserved.