Package org.jumpmind.symmetric
Class AbstractSymmetricEngine
java.lang.Object
org.jumpmind.symmetric.AbstractSymmetricEngine
- All Implemented Interfaces:
ISymmetricEngine
- Direct Known Subclasses:
ClientSymmetricEngine
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected IAcknowledgeServiceprotected IBandwidthServiceprotected ICacheManagerprotected IClusterServiceprotected IConcurrentConnectionManagerprotected IConfigurationServiceprotected IContextServiceprotected IDataExtractorServiceprotected IDataLoaderServiceprotected IDataServiceprotected Stringprotected Stringprotected IExtensionServiceprotected IDataExtractorServiceprotected IFileSyncServiceprotected IGroupletServiceprotected IIncomingBatchServiceprotected IInitialLoadServiceprotected IJobManagerprotected Dateprotected ILoadFilterServiceprotected INodeCommunicationServiceprotected INodeServiceprotected IOfflinePullServiceprotected IOfflinePushServiceprotected ITransportManagerprotected IOutgoingBatchServiceprotected ParameterServiceprotected IDatabasePlatformprotected ITypedPropertiesFactoryprotected IPullServiceprotected IPurgeServiceprotected IPushServiceprotected booleanprotected IRegistrationServiceprotected IRouterServiceprotected ISecurityServiceprotected ISequenceServiceprotected IStagingManagerprotected IStatisticManagerprotected IStatisticServiceprotected ISymmetricDialectprotected ITransformServiceprotected ITransportManagerprotected ITriggerRouterServiceprotected IUpdateService -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected IFileSyncServiceprotected INodeCommunicationServiceprotected IRouterServiceprotected booleanprotected NodecheckSystemIntegrity(Node node) voidprotected IClusterServiceprotected abstract IDatabasePlatformcreateDatabasePlatform(TypedProperties properties) protected abstract IExtensionServiceprotected abstract IJobManagerprotected abstract IStagingManagerprotected abstract IStatisticManagerprotected abstract ISymmetricDialectprotected ISymmetricDialectprotected abstract ITypedPropertiesFactoryvoiddestroy()static ISymmetricEnginefindEngineByName(String name) Locate aStandaloneSymmetricEnginein the same JVMstatic ISymmetricEnginefindEngineByNodeId(String nodeId) static ISymmetricEnginefindEngineByUrl(String url) Locate aStandaloneSymmetricEnginein the same JVMstatic List<ISymmetricEngine>booleanCall this to force all triggers to be rebuilt<T> Torg.slf4j.LoggergetLog()Get the current status of this node.Get a list of configured properties for Symmetric.protected abstract SecurityServiceFactory.SecurityServiceTypeprotected booleanvoidheartbeat(boolean force) Push a copy of the node onto the push queue so the SymmetricDS node 'checks' in with it's root node.protected voidinit()booleanWill check to see if this instance of SymmetricDS is configured with the required properties for a node to operate.booleanbooleanCheck to see if this node has been registered.booleanCheck to see if this node has been started.booleanCheck to see if this node is starting.protected booleanGive the end user the option to provide a script that will load a registration server with an initial SymmetricDS setup.voidopenRegistration(String nodeGroupId, String externalId) Open up registration for node to attach.pull()Will perform a pull the same way thePullJobwould have.voidpurge()This can be called to do a purge.push()Will perform a push the same way thePushJobwould have.protected voidregisterSymDSDriver(TypedProperties engineProperties) reloadNode(String nodeId, String createBy) Queue up an initial load or a reload to a node.voidremoveAndCleanupNode(String nodeId) voidreOpenRegistration(String nodeId) voidroute()Route captured data the same way theRouterJobwould have.voidsetDeploymentSubType(String deploymentSubType) voidsetDeploymentType(String deploymentType) voidsetup()Will setup the SymmetricDS tables, if not already setup and if the engine is configured to do so.voidsetupDatabase(boolean force) Attempt to configure the database objects that support SymmetricDS.booleanstart()Must be called to start SymmetricDS.booleanstart(boolean startJobs) voidstop()booleanCall this to resync triggerstoString()voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jumpmind.symmetric.ISymmetricEngine
listSnapshots, snapshot
-
Field Details
-
deploymentType
-
deploymentSubType
-
propertiesFactory
-
platform
-
securityService
-
parameterService
-
symmetricDialect
-
nodeService
-
configurationService
-
bandwidthService
-
statisticService
-
statisticManager
-
concurrentConnectionManager
-
transportManager
-
offlineTransportManager
-
clusterService
-
purgeService
-
transformService
-
initialLoadService
-
loadFilterService
-
triggerRouterService
-
outgoingBatchService
-
dataService
-
routerService
-
dataExtractorService
-
fileSyncExtractorService
-
registrationService
-
dataLoaderService
-
incomingBatchService
-
acknowledgeService
-
pushService
-
pullService
-
offlinePushService
-
offlinePullService
-
jobManager
-
sequenceService
-
extensionService
-
groupletService
-
stagingManager
-
nodeCommunicationService
-
fileSyncService
-
contextService
-
updateService
-
cacheManager
-
lastRestartTime
-
registerEngine
protected boolean registerEngine
-
-
Constructor Details
-
AbstractSymmetricEngine
protected AbstractSymmetricEngine(boolean registerEngine)
-
-
Method Details
-
createTypedPropertiesFactory
-
createDatabasePlatform
-
findEngines
-
findEngineByUrl
Locate aStandaloneSymmetricEnginein the same JVM -
findEngineByName
Locate aStandaloneSymmetricEnginein the same JVM -
findEngineByNodeId
-
setDeploymentType
-
setDeploymentSubType
-
getSecurityServiceType
-
init
protected void init() -
registerSymDSDriver
-
createClusterService
-
buildRouterService
-
buildFileSyncService
-
buildNodeCommunicationService
-
createStagingManager
-
createStatisticManager
-
createSymmetricDialect
-
createTargetDialect
-
createExtensionService
-
createJobManager
-
getSyncUrl
- Specified by:
getSyncUrlin interfaceISymmetricEngine- Returns:
- the URL that represents this engine
-
getProperties
Description copied from interface:ISymmetricEngineGet a list of configured properties for Symmetric. Read-only.- Specified by:
getPropertiesin interfaceISymmetricEngine
-
getEngineName
- Specified by:
getEngineNamein interfaceISymmetricEngine- Returns:
- The lower case representation of the engine name as setup in the symmetric.properties file. We always use a lower case representation because there are times the engine name is used in triggers at which point you can lose the original case representation.
-
setup
public void setup()Description copied from interface:ISymmetricEngineWill setup the SymmetricDS tables, if not already setup and if the engine is configured to do so.- Specified by:
setupin interfaceISymmetricEngine
-
setupDatabase
public void setupDatabase(boolean force) Description copied from interface:ISymmetricEngineAttempt to configure the database objects that support SymmetricDS. If they are out of date this method will attempt to alter the tables to bring them up to date.- Specified by:
setupDatabasein interfaceISymmetricEngine- Parameters:
force- forces this action to be run regardless of the parameter settings
-
hasSoftwareVersionChanged
protected boolean hasSoftwareVersionChanged() -
autoConfigRegistrationServer
protected void autoConfigRegistrationServer() -
buildTablesFromDdlUtilXmlIfProvided
protected boolean buildTablesFromDdlUtilXmlIfProvided() -
loadFromScriptIfProvided
protected boolean loadFromScriptIfProvided()Give the end user the option to provide a script that will load a registration server with an initial SymmetricDS setup. Look first on the file system, then in the classpath for the SQL file.- Returns:
- true if the script was executed
-
start
public boolean start()Description copied from interface:ISymmetricEngineMust be called to start SymmetricDS.- Specified by:
startin interfaceISymmetricEngine- Returns:
- true if successfully started
-
start
public boolean start(boolean startJobs) - Specified by:
startin interfaceISymmetricEngine
-
checkSystemIntegrity
-
getEngineDescription
- Specified by:
getEngineDescriptionin interfaceISymmetricEngine
-
uninstall
public void uninstall()- Specified by:
uninstallin interfaceISymmetricEngine
-
stop
public void stop()- Specified by:
stopin interfaceISymmetricEngine
-
destroy
public void destroy()- Specified by:
destroyin interfaceISymmetricEngine
-
reloadNode
Description copied from interface:ISymmetricEngineQueue up an initial load or a reload to a node.- Specified by:
reloadNodein interfaceISymmetricEnginecreateBy- TODO
-
sendSQL
public String sendSQL(String nodeId, String catalogName, String schemaName, String tableName, String sql) - Specified by:
sendSQLin interfaceISymmetricEngine
-
push
Description copied from interface:ISymmetricEngineWill perform a push the same way thePushJobwould have.- Specified by:
pushin interfaceISymmetricEngine- Returns:
RemoteNodeStatuses- See Also:
-
syncTriggers
public boolean syncTriggers()Description copied from interface:ISymmetricEngineCall this to resync triggers- Specified by:
syncTriggersin interfaceISymmetricEngine- See Also:
-
forceTriggerRebuild
public boolean forceTriggerRebuild()Description copied from interface:ISymmetricEngineCall this to force all triggers to be rebuilt- Specified by:
forceTriggerRebuildin interfaceISymmetricEngine- See Also:
-
ITriggerRouterService#forceTriggerRebuild()
-
getNodeStatus
Description copied from interface:ISymmetricEngineGet the current status of this node.- Specified by:
getNodeStatusin interfaceISymmetricEngine- Returns:
NodeStatus
-
removeAndCleanupNode
- Specified by:
removeAndCleanupNodein interfaceISymmetricEngine
-
pull
Description copied from interface:ISymmetricEngineWill perform a pull the same way thePullJobwould have.- Specified by:
pullin interfaceISymmetricEngine- Returns:
RemoteNodeStatuses- See Also:
-
route
public void route()Description copied from interface:ISymmetricEngineRoute captured data the same way theRouterJobwould have.- Specified by:
routein interfaceISymmetricEngine
-
purge
public void purge()Description copied from interface:ISymmetricEngineThis can be called to do a purge. It may be called only if theOutgoingPurgeJobhas not been enabled.- Specified by:
purgein interfaceISymmetricEngine- See Also:
-
isConfigured
public boolean isConfigured()Description copied from interface:ISymmetricEngineWill check to see if this instance of SymmetricDS is configured with the required properties for a node to operate.- Specified by:
isConfiguredin interfaceISymmetricEngine
-
heartbeat
public void heartbeat(boolean force) Description copied from interface:ISymmetricEnginePush a copy of the node onto the push queue so the SymmetricDS node 'checks' in with it's root node.- Specified by:
heartbeatin interfaceISymmetricEngine- Parameters:
force- When force is true the heart beat will always be inserted. If it is false, the heart beat will only be inserted if the period between heart beats has expired.
-
openRegistration
Description copied from interface:ISymmetricEngineOpen up registration for node to attach.- Specified by:
openRegistrationin interfaceISymmetricEngine- See Also:
-
clearCaches
public void clearCaches()- Specified by:
clearCachesin interfaceISymmetricEngine
-
reOpenRegistration
- Specified by:
reOpenRegistrationin interfaceISymmetricEngine
-
isRegistered
public boolean isRegistered()Description copied from interface:ISymmetricEngineCheck to see if this node has been registered.- Specified by:
isRegisteredin interfaceISymmetricEngine- Returns:
- true if the node is registered
-
isStarted
public boolean isStarted()Description copied from interface:ISymmetricEngineCheck to see if this node has been started.- Specified by:
isStartedin interfaceISymmetricEngine- Returns:
- true if the node is started
-
isStarting
public boolean isStarting()Description copied from interface:ISymmetricEngineCheck to see if this node is starting.- Specified by:
isStartingin interfaceISymmetricEngine- Returns:
- true if the node is starting
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceISymmetricEngine
-
getConfigurationService
- Specified by:
getConfigurationServicein interfaceISymmetricEngine
-
getParameterService
- Specified by:
getParameterServicein interfaceISymmetricEngine
-
getNodeService
- Specified by:
getNodeServicein interfaceISymmetricEngine
-
getRegistrationService
- Specified by:
getRegistrationServicein interfaceISymmetricEngine
-
getClusterService
- Specified by:
getClusterServicein interfaceISymmetricEngine
-
getPurgeService
- Specified by:
getPurgeServicein interfaceISymmetricEngine
-
getDataService
- Specified by:
getDataServicein interfaceISymmetricEngine
-
getJobManager
- Specified by:
getJobManagerin interfaceISymmetricEngine
-
getOutgoingBatchService
- Specified by:
getOutgoingBatchServicein interfaceISymmetricEngine
-
getAcknowledgeService
- Specified by:
getAcknowledgeServicein interfaceISymmetricEngine
-
getBandwidthService
- Specified by:
getBandwidthServicein interfaceISymmetricEngine
-
getDataExtractorService
- Specified by:
getDataExtractorServicein interfaceISymmetricEngine
-
getFileSyncExtractorService
- Specified by:
getFileSyncExtractorServicein interfaceISymmetricEngine
-
getDataLoaderService
- Specified by:
getDataLoaderServicein interfaceISymmetricEngine
-
getIncomingBatchService
- Specified by:
getIncomingBatchServicein interfaceISymmetricEngine
-
getPullService
- Specified by:
getPullServicein interfaceISymmetricEngine
-
getPushService
- Specified by:
getPushServicein interfaceISymmetricEngine
-
getOfflinePullService
- Specified by:
getOfflinePullServicein interfaceISymmetricEngine
-
getOfflinePushService
- Specified by:
getOfflinePushServicein interfaceISymmetricEngine
-
getRouterService
- Specified by:
getRouterServicein interfaceISymmetricEngine
-
getSecurityService
- Specified by:
getSecurityServicein interfaceISymmetricEngine
-
getStatisticService
- Specified by:
getStatisticServicein interfaceISymmetricEngine
-
getStatisticManager
- Specified by:
getStatisticManagerin interfaceISymmetricEngine
-
getTriggerRouterService
- Specified by:
getTriggerRouterServicein interfaceISymmetricEngine
-
getDeploymentType
- Specified by:
getDeploymentTypein interfaceISymmetricEngine
-
getDeploymentSubType
- Specified by:
getDeploymentSubTypein interfaceISymmetricEngine
-
getTransformService
- Specified by:
getTransformServicein interfaceISymmetricEngine
-
getLoadFilterService
- Specified by:
getLoadFilterServicein interfaceISymmetricEngine
-
getInitialLoadService
- Specified by:
getInitialLoadServicein interfaceISymmetricEngine
-
getConcurrentConnectionManager
- Specified by:
getConcurrentConnectionManagerin interfaceISymmetricEngine
-
getTablePrefix
- Specified by:
getTablePrefixin interfaceISymmetricEngine
-
getTransportManager
- Specified by:
getTransportManagerin interfaceISymmetricEngine
-
getOfflineTransportManager
-
getExtensionService
- Specified by:
getExtensionServicein interfaceISymmetricEngine
-
getContextService
- Specified by:
getContextServicein interfaceISymmetricEngine
-
getStagingManager
- Specified by:
getStagingManagerin interfaceISymmetricEngine
-
getSequenceService
- Specified by:
getSequenceServicein interfaceISymmetricEngine
-
getNodeCommunicationService
- Specified by:
getNodeCommunicationServicein interfaceISymmetricEngine
-
getGroupletService
- Specified by:
getGroupletServicein interfaceISymmetricEngine
-
getLastException
- Specified by:
getLastExceptionin interfaceISymmetricEngine
-
getLastExceptionMessage
- Specified by:
getLastExceptionMessagein interfaceISymmetricEngine
-
getLastRestartTime
- Specified by:
getLastRestartTimein interfaceISymmetricEngine
-
getSqlTemplate
- Specified by:
getSqlTemplatein interfaceISymmetricEngine
-
getLog
public org.slf4j.Logger getLog()- Specified by:
getLogin interfaceISymmetricEngine
-
getDataSource
public <T> T getDataSource()- Specified by:
getDataSourcein interfaceISymmetricEngine
-
getDatabasePlatform
- Specified by:
getDatabasePlatformin interfaceISymmetricEngine
-
getFileSyncService
- Specified by:
getFileSyncServicein interfaceISymmetricEngine
-
getUpdateService
- Specified by:
getUpdateServicein interfaceISymmetricEngine
-
getNodeId
- Specified by:
getNodeIdin interfaceISymmetricEngine
-
getSymmetricDialect
- Specified by:
getSymmetricDialectin interfaceISymmetricEngine
-
getTargetDialect
- Specified by:
getTargetDialectin interfaceISymmetricEngine
-
toString
-
getCacheManager
- Specified by:
getCacheManagerin interfaceISymmetricEngine
-