public class SynchroContext extends Object
Modifier and Type | Field and Description |
---|---|
protected SynchroResult |
result |
protected Properties |
sourceConnectionProperties |
protected Map<String,SynchroPendingOperationBuffer> |
tableContextMap |
protected Predicate<String> |
tableFilter |
protected Set<String> |
tableNames |
protected Properties |
targetConnectionProperties |
Constructor and Description |
---|
SynchroContext() |
Modifier and Type | Method and Description |
---|---|
void |
addTableContext(String tableName,
SynchroPendingOperationBuffer tableContext) |
SynchroResult |
getResult() |
Properties |
getSourceConnectionProperties() |
SynchroPendingOperationBuffer |
getTableContext(String tableName) |
Predicate<String> |
getTableFilter() |
Set<String> |
getTableNames() |
Properties |
getTargetConnectionProperties() |
static SynchroContext |
newContext(Set<String> tableNames,
Predicate<String> tableFilter,
Properties sourceConnectionProperties,
Properties targetConnectionProperties,
SynchroResult result)
Create a new synchro context
|
static SynchroContext |
newContext(Set<String> tableNames,
Properties sourceConnectionProperties,
Properties targetConnectionProperties,
SynchroResult result)
Create a new synchro context
|
void |
removeTableContext(String tableName) |
void |
setResult(SynchroResult result) |
void |
setSourceConnectionProperties(Properties sourceConnectionProperties) |
void |
setTableFilter(Predicate<String> tableFilter) |
void |
setTableNames(Set<String> tableNames) |
void |
setTargetConnectionProperties(Properties targetConnectionProperties) |
protected Properties sourceConnectionProperties
protected Properties targetConnectionProperties
protected SynchroResult result
protected Predicate<String> tableFilter
protected Set<String> tableNames
protected Map<String,SynchroPendingOperationBuffer> tableContextMap
public SynchroContext()
public static SynchroContext newContext(Set<String> tableNames, Predicate<String> tableFilter, Properties sourceConnectionProperties, Properties targetConnectionProperties, SynchroResult result)
tableNames
- Table set to includes. If null, all tables will be processed by table filtertableFilter
- Use to filter tables to process. If null, given tables names will be processed. See
SynchroMetadataUtils
for predicate examples with includes/excludes.sourceConnectionProperties
- Connection properties for source databasetargetConnectionProperties
- Connection properties for target databasesecurityContext
- A security context (use for data synchronization: see SynchroInterceptor
)result
- Store the synchronization resultSynchroInterceptor
public static SynchroContext newContext(Set<String> tableNames, Properties sourceConnectionProperties, Properties targetConnectionProperties, SynchroResult result)
tableNames
- Table set to includes. If null, all tables will be retrieve.sourceConnectionProperties
- Connection properties for source databasetargetConnectionProperties
- Connection properties for target databasesecurityContext
- A security context (use for data synchronisation)result
- Store the synchronization resultpublic SynchroResult getResult()
public void setResult(SynchroResult result)
public void setSourceConnectionProperties(Properties sourceConnectionProperties)
public void setTargetConnectionProperties(Properties targetConnectionProperties)
public void setTableFilter(Predicate<String> tableFilter)
public void setTableNames(Set<String> tableNames)
public Properties getSourceConnectionProperties()
public Properties getTargetConnectionProperties()
public Predicate<String> getTableFilter()
public Set<String> getTableNames()
public SynchroPendingOperationBuffer getTableContext(String tableName)
public void addTableContext(String tableName, SynchroPendingOperationBuffer tableContext)
public void removeTableContext(String tableName)
Copyright © 2012–2014 IFREMER. All rights reserved.