Xindice API
version 1.1

org.apache.xindice.core
Class DatabaseChangeObserver

java.lang.Object
  |
  +--org.apache.xindice.core.DBObserver
        |
        +--org.apache.xindice.core.DatabaseChangeObserver

public class DatabaseChangeObserver
extends DBObserver

DatabaseChangeObserver is going to handle changes to collections by flushing the apporate collection Filer. This current version we are only going to worry about document changes and their Filer storage are kept updated. Todd Byrne


Constructor Summary
DatabaseChangeObserver()
           
 
Method Summary
 void createCollection(Collection col)
          Called after Collection.create()
 void dropCollection(Collection col)
          Called before Collection.drop()
 void dropDocument(Collection col, Key key)
          Queues the collection to be flushed by the FlushTask synchronized by the hashtable
 void flushDatabaseConfig(Database db, Configuration cfg)
          Called after Database.flushConfig()
 void loadDocument(Collection col, Record record, org.w3c.dom.Document document)
          Called after Collection.getDocument()
 void putDocument(Collection col, Key key, org.w3c.dom.Document document, boolean create)
          Called after Collection.putDocument()
 void setCollectionConfig(Collection col, Configuration cfg)
          Called after Collection.setConfig()
 void setDatabaseConfig(Database db, Map collections, Configuration cfg)
          Called after Database.setConfig()
 
Methods inherited from class org.apache.xindice.core.DBObserver
getInstance, setInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseChangeObserver

public DatabaseChangeObserver()
Method Detail

dropDocument

public void dropDocument(Collection col,
                         Key key)
                  throws DBException
Queues the collection to be flushed by the FlushTask synchronized by the hashtable
Overrides:
dropDocument in class DBObserver
Parameters:
col - Collection
key - Key
Throws:
DBException -  

putDocument

public void putDocument(Collection col,
                        Key key,
                        org.w3c.dom.Document document,
                        boolean create)
                 throws DBException
Description copied from class: DBObserver
Called after Collection.putDocument()
Overrides:
putDocument in class DBObserver
Parameters:
col - Collection
key - Key
document - Document
create - boolean
Throws:
DBException -  

createCollection

public void createCollection(Collection col)
                      throws DBException
Description copied from class: DBObserver
Called after Collection.create()
Overrides:
createCollection in class DBObserver
Parameters:
col - Collection
Throws:
DBException -  

loadDocument

public void loadDocument(Collection col,
                         Record record,
                         org.w3c.dom.Document document)
                  throws DBException
Description copied from class: DBObserver
Called after Collection.getDocument()
Overrides:
loadDocument in class DBObserver
Parameters:
col - Collection
record - Record
document - Document
Throws:
DBException -  

dropCollection

public void dropCollection(Collection col)
                    throws DBException
Description copied from class: DBObserver
Called before Collection.drop()
Overrides:
dropCollection in class DBObserver
Parameters:
col - Collection
Throws:
DBException -  

flushDatabaseConfig

public void flushDatabaseConfig(Database db,
                                Configuration cfg)
Description copied from class: DBObserver
Called after Database.flushConfig()
Overrides:
flushDatabaseConfig in class DBObserver
Parameters:
db - Database
cfg - Configuration

setCollectionConfig

public void setCollectionConfig(Collection col,
                                Configuration cfg)
Description copied from class: DBObserver
Called after Collection.setConfig()
Overrides:
setCollectionConfig in class DBObserver
Parameters:
col - Collection
cfg - Configuration

setDatabaseConfig

public void setDatabaseConfig(Database db,
                              Map collections,
                              Configuration cfg)
Description copied from class: DBObserver
Called after Database.setConfig()
Overrides:
setDatabaseConfig in class DBObserver
Parameters:
db - Database
collections - Map
cfg - Configuration

Xindice API
version 1.1

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