org.compass.gps.device.jdbc
Class AbstractJdbcActiveMirrorGpsDevice

java.lang.Object
  extended by org.compass.gps.device.AbstractGpsDevice
      extended by org.compass.gps.device.jdbc.AbstractJdbcGpsDevice
          extended by org.compass.gps.device.jdbc.AbstractJdbcActiveMirrorGpsDevice
All Implemented Interfaces:
ActiveMirrorGpsDevice, CompassGpsDevice, JdbcActiveMirrorGpsDevice, JdbcGpsDevice, MirrorDataChangesGpsDevice
Direct Known Subclasses:
ResultSetJdbcGpsDevice

public abstract class AbstractJdbcActiveMirrorGpsDevice
extends AbstractJdbcGpsDevice
implements JdbcActiveMirrorGpsDevice

A helper base class for Jdbc active mirror gps device.

Author:
kimchy

Nested Class Summary
 
Nested classes/interfaces inherited from class org.compass.gps.device.jdbc.AbstractJdbcGpsDevice
AbstractJdbcGpsDevice.IndexExecution
 
Field Summary
 
Fields inherited from class org.compass.gps.device.jdbc.AbstractJdbcGpsDevice
dataSource, dialect, log
 
Fields inherited from class org.compass.gps.device.AbstractGpsDevice
compassGps
 
Constructor Summary
AbstractJdbcActiveMirrorGpsDevice()
           
 
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 isMirrorDataChanges()
          Should the device perform real time data mirroring.
 boolean isSaveSnapshotAfterMirror()
          Should the snapshot be saved/persisted after each mirroring operation.
 void setMirrorDataChanges(boolean mirrorDataChanges)
          Sets if the device will perform real time data changes mirroring.
 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 class org.compass.gps.device.jdbc.AbstractJdbcGpsDevice
doGetIndexExecutions, doIndex, doStart, getDataSource, getDialect, getFetchSize, processResultSet, processRow, processRowValue, setDataSource, setDialect, setFetchSize
 
Methods inherited from class org.compass.gps.device.AbstractGpsDevice
buildMessage, doIndex, doStop, getGps, getName, index, injectGps, isFilteredForIndex, isPerformingIndexOperation, isRunning, refresh, setFilteredEntitiesForIndex, setName, shouldMirrorDataChanges, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Constructor Detail

AbstractJdbcActiveMirrorGpsDevice

public AbstractJdbcActiveMirrorGpsDevice()
Method Detail

isMirrorDataChanges

public boolean isMirrorDataChanges()
Description copied from interface: MirrorDataChangesGpsDevice
Should the device perform real time data mirroring.

Specified by:
isMirrorDataChanges in interface MirrorDataChangesGpsDevice
Returns:
true if the device mirror data changes

setMirrorDataChanges

public void setMirrorDataChanges(boolean mirrorDataChanges)
Description copied from interface: MirrorDataChangesGpsDevice
Sets if the device will perform real time data changes mirroring.

Specified by:
setMirrorDataChanges in interface MirrorDataChangesGpsDevice
Parameters:
mirrorDataChanges - Should the device mirror data changes

getSnapshotEventListener

public JdbcSnapshotEventListener getSnapshotEventListener()
Description copied from interface: JdbcActiveMirrorGpsDevice
Returns the jdbc snapshot event listener that will handle database change events.

Specified by:
getSnapshotEventListener in interface JdbcActiveMirrorGpsDevice
Returns:
The jdbc snapshot event listener.

setSnapshotEventListener

public void setSnapshotEventListener(JdbcSnapshotEventListener snapshotEventListener)
Description copied from interface: JdbcActiveMirrorGpsDevice
Sets the jdbc snapshot event listener that will handle database change events.

Specified by:
setSnapshotEventListener in interface JdbcActiveMirrorGpsDevice

getSnapshotPersister

public JdbcSnapshotPersister getSnapshotPersister()
Description copied from interface: JdbcActiveMirrorGpsDevice
Returns the snapshot persister that will persist and load the snapshot information.

Specified by:
getSnapshotPersister in interface JdbcActiveMirrorGpsDevice
Returns:
The Jdbc snapshot persister.

setSnapshotPersister

public void setSnapshotPersister(JdbcSnapshotPersister snapshotPersister)
Description copied from interface: JdbcActiveMirrorGpsDevice
Sets the snapshot persister that will persist and load the snapshot information.

Specified by:
setSnapshotPersister in interface JdbcActiveMirrorGpsDevice

isSaveSnapshotAfterMirror

public boolean isSaveSnapshotAfterMirror()
Description copied from interface: JdbcActiveMirrorGpsDevice
Should the snapshot be saved/persisted after each mirroring operation.

Note that it is persisted when the gps device stops.

Specified by:
isSaveSnapshotAfterMirror in interface JdbcActiveMirrorGpsDevice
Returns:
true if the snapshot should be persisted after each mirroring operation.

setSaveSnapshotAfterMirror

public void setSaveSnapshotAfterMirror(boolean saveSnapshotAfterMirror)
Description copied from interface: JdbcActiveMirrorGpsDevice
Sets if the snapshot be saved/persisted after each mirroring operation.

Note that it is persisted when the gps device stops.

Specified by:
setSaveSnapshotAfterMirror in interface JdbcActiveMirrorGpsDevice


Copyright (c) 2004-2009 The Compass Project.