D
- Driver or DataSourcepublic class SynchronizationContextImpl<Z,D extends Database<Z>> extends Object implements SynchronizationContext<Z,D>
Constructor and Description |
---|
SynchronizationContextImpl(DatabaseCluster<Z,D> cluster,
D database) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes any open database connections and shuts down the executor service.
|
Set<D> |
getActiveDatabaseSet()
Returns a snapshot of the activate databases in the cluster at the time synchronization started.
|
Connection |
getConnection(D database)
Returns a connection to the specified database.
|
Decoder |
getDecoder() |
Dialect |
getDialect()
Returns the dialect of the cluster.
|
ExecutorService |
getExecutor()
An executor service for executing tasks asynchronously.
|
D |
getSourceDatabase()
Returns the database from which to synchronize.
|
DatabaseProperties |
getSourceDatabaseProperties()
Returns a cache of database meta data for the source database.
|
SynchronizationSupport |
getSynchronizationSupport() |
D |
getTargetDatabase()
Returns the database to synchronize.
|
DatabaseProperties |
getTargetDatabaseProperties()
Returns a cache of database meta data for the target database.
|
public SynchronizationContextImpl(DatabaseCluster<Z,D> cluster, D database) throws SQLException
cluster
- database
- SQLException
public Connection getConnection(D database) throws SQLException
SynchronizationContext
getConnection
in interface SynchronizationContext<Z,D extends Database<Z>>
database
- a database to which to connectSQLException
- if connection could not be obtainedSynchronizationContext.getConnection(net.sf.hajdbc.Database)
public D getSourceDatabase()
SynchronizationContext
getSourceDatabase
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getSourceDatabase()
public D getTargetDatabase()
SynchronizationContext
getTargetDatabase
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getTargetDatabase()
public Set<D> getActiveDatabaseSet()
SynchronizationContext
getActiveDatabaseSet
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getActiveDatabaseSet()
public DatabaseProperties getSourceDatabaseProperties()
SynchronizationContext
getSourceDatabaseProperties
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getSourceDatabaseProperties()
public DatabaseProperties getTargetDatabaseProperties()
SynchronizationContext
getTargetDatabaseProperties
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getTargetDatabaseProperties()
public Dialect getDialect()
SynchronizationContext
getDialect
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getDialect()
public Decoder getDecoder()
getDecoder
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getDecoder()
public ExecutorService getExecutor()
SynchronizationContext
getExecutor
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getExecutor()
public SynchronizationSupport getSynchronizationSupport()
getSynchronizationSupport
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.getSynchronizationSupport()
public void close()
SynchronizationContext
close
in interface SynchronizationContext<Z,D extends Database<Z>>
SynchronizationContext.close()
Copyright © 2004–2014 Paul Ferraro. All rights reserved.