org.compass.gps.device.jdbc
Interface JdbcActiveMirrorGpsDevice

All Superinterfaces:
ActiveMirrorGpsDevice, CompassGpsDevice, JdbcGpsDevice, MirrorDataChangesGpsDevice
All Known Implementing Classes:
AbstractJdbcActiveMirrorGpsDevice, ResultSetJdbcGpsDevice

public interface JdbcActiveMirrorGpsDevice
extends JdbcGpsDevice, ActiveMirrorGpsDevice

An extension of the JdbcGpsDevice that can also detect real time data changes made to the database and reflect them to the index.

The device will use the JdbcSnapshotEventListener to handle database change events (which should be reflected to the index).

The device will use the provided JdbcSnapshotPersister to persist the snapshot information and load it.

Author:
kimchy

Method Summary
 JdbcSnapshotEventListener getSnapshotEventListener()
          Returns the jdbc snapshot event listener that will handle database change events.
 JdbcSnapshotPersister getSnapshotPersister()
          Returns the snapshot persister that will persist and load the snapshot information.
 boolean isSaveSnapshotAfterMirror()
          Should the snapshot be saved/persisted after each mirroring operation.
 void setSaveSnapshotAfterMirror(boolean saveSnapshotAfterMirror)
          Sets if the snapshot be saved/persisted after each mirroring operation.
 void setSnapshotEventListener(JdbcSnapshotEventListener snapshotEventListener)
          Sets the jdbc snapshot event listener that will handle database change events.
 void setSnapshotPersister(JdbcSnapshotPersister snapshotPersister)
          Sets the snapshot persister that will persist and load the snapshot information.
 
Methods inherited from interface org.compass.gps.device.jdbc.JdbcGpsDevice
getDataSource, getDialect, getFetchSize, setDataSource, setDialect, setFetchSize
 
Methods inherited from interface org.compass.gps.ActiveMirrorGpsDevice
performMirroring
 
Methods inherited from interface org.compass.gps.MirrorDataChangesGpsDevice
isMirrorDataChanges, setMirrorDataChanges
 

Method Detail

getSnapshotEventListener

JdbcSnapshotEventListener getSnapshotEventListener()
Returns the jdbc snapshot event listener that will handle database change events.

Returns:
The jdbc snapshot event listener.

setSnapshotEventListener

void setSnapshotEventListener(JdbcSnapshotEventListener snapshotEventListener)
Sets the jdbc snapshot event listener that will handle database change events.

Parameters:
snapshotEventListener -

getSnapshotPersister

JdbcSnapshotPersister getSnapshotPersister()
Returns the snapshot persister that will persist and load the snapshot information.

Returns:
The Jdbc snapshot persister.

setSnapshotPersister

void setSnapshotPersister(JdbcSnapshotPersister snapshotPersister)
Sets the snapshot persister that will persist and load the snapshot information.

Parameters:
snapshotPersister -

isSaveSnapshotAfterMirror

boolean isSaveSnapshotAfterMirror()
Should the snapshot be saved/persisted after each mirroring operation.

Note that it is persisted when the gps device stops.

Returns:
true if the snapshot should be persisted after each mirroring operation.

setSaveSnapshotAfterMirror

void setSaveSnapshotAfterMirror(boolean saveSnapshotAfterMirror)
Sets if the snapshot be saved/persisted after each mirroring operation.

Note that it is persisted when the gps device stops.

Parameters:
saveSnapshotAfterMirror -


Copyright (c) 2004-2008 The Compass Project.