Xindice API
version 1.2m1

org.apache.xindice.core
Class DatabaseChangeObserver

java.lang.Object
  extended byorg.apache.xindice.core.DBObserver
      extended byorg.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.

Version:
$Revision: 564833 $, $Date: 2007-08-11 00:25:23 -0400 (Sat, 11 Aug 2007) $
Author:
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

Specified by:
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()

Specified by:
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()

Specified by:
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()

Specified by:
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()

Specified by:
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()

Specified by:
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()

Specified by:
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()

Specified by:
setDatabaseConfig in class DBObserver
Parameters:
db - Database
collections - Map
cfg - Configuration

Xindice API
version 1.2m1

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