Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
0004838: New extension point that can be used while obtaining a list of
tables for a given trigger configuration
- Loading branch information
joshhicks
committed
Feb 17, 2021
1 parent
3aff6be
commit 9ccc7e9
Showing
6 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
symmetric-assemble/src/asciidoc/configuration/table-triggers/expandable.ad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
==== Expandable Triggers | ||
|
||
When a set of tables is repeated for each node and the tables all contain a prefix which groups them together an expandable trigger can be used. The prefix will be resolved to the external id that the source node replicates with either through a push or pull. | ||
|
||
.Variable | ||
[cols=".^2,2"] | ||
|=== | ||
|
||
|$(targetExternalId)|Resolved by looking up all the nodes the source node replicates with and will be replaced with each external id to represent a table. | ||
|
||
|=== | ||
|
||
.Example | ||
---- | ||
$(targetExternalId)-Item | ||
|
||
If there are nodes present with external ids of client1, client2, client3 then this trigger configuration would match the following 3 tables. | ||
|
||
client1-Item | ||
client2-Item | ||
client3-Item | ||
|
||
This reduces configuration if there are for example 10 tables that are repeated for each client then only table trigger configurations would be needed and as new nodes are added (along with their tables) there is no need to add any more configuration. | ||
---- |
15 changes: 15 additions & 0 deletions
15
symmetric-core/src/main/java/org/jumpmind/symmetric/config/ITableResolver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package org.jumpmind.symmetric.config; | ||
|
||
import java.util.Set; | ||
|
||
import org.jumpmind.db.model.Table; | ||
import org.jumpmind.db.platform.IDatabasePlatform; | ||
import org.jumpmind.extension.IExtensionPoint; | ||
import org.jumpmind.symmetric.model.Trigger; | ||
import org.jumpmind.symmetric.service.INodeService; | ||
|
||
public interface ITableResolver extends IExtensionPoint { | ||
|
||
public void resolve(String catalog, String schema, Set<Table> tables, IDatabasePlatform platform, | ||
INodeService nodeService, Trigger trigger); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters