Package org.jumpmind.symmetric.route
Class JavaDataRouter
java.lang.Object
org.jumpmind.symmetric.route.AbstractDataRouter
org.jumpmind.symmetric.route.JavaDataRouter
- All Implemented Interfaces:
IBuiltInExtensionPoint,IExtensionPoint,IDataRouter
This java data router is invoked when the router_type is 'java'. The router_expression is Java code for the routeToNodes() method of a class that extends the
AbstractDataRouter. The class is compiled in memory and cached by both the context of the batch and the classloader. For a new batch, if the
router_expression is the same, the same class is used, otherwise the class is renamed, compiled, and loaded again.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringprotected ISymmetricDialectprotected ISymmetricEngineprotected final StringFields inherited from class org.jumpmind.symmetric.route.AbstractDataRouter
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IDataRoutergetCompiledClass(SimpleRouterContext context, Router router) booleanOverride if a router is able to route non-DML DataEventTypes.routeToNodes(SimpleRouterContext context, DataMetaData dataMetaData, Set<Node> nodes, boolean initialLoad, boolean initialLoadSelectUsed, TriggerRouter triggerRouter) Methods inherited from class org.jumpmind.symmetric.route.AbstractDataRouter
addNodeId, completeBatch, contextCommitted, getDataAsObject, getDataAsString, getDataMap, getDataObjectMap, getNewDataAsObject, getNewDataAsString, getNullData, getOldDataAsObject, getOldDataAsString, getPkDataAsObject, getPkDataAsString, isConfigurable, testColumnNamesMatchValues, toExternalIds, toNodeIds
-
Field Details
-
CODE_START
- See Also:
-
CODE_END
- See Also:
-
engine
-
dialect
-
ROUTER_KEY
-
-
Constructor Details
-
JavaDataRouter
-
-
Method Details
-
routeToNodes
public Set<String> routeToNodes(SimpleRouterContext context, DataMetaData dataMetaData, Set<Node> nodes, boolean initialLoad, boolean initialLoadSelectUsed, TriggerRouter triggerRouter) - Specified by:
routeToNodesin interfaceIDataRouter
-
getCompiledClass
- Throws:
Exception
-
isDmlOnly
public boolean isDmlOnly()Description copied from class:AbstractDataRouterOverride if a router is able to route non-DML DataEventTypes.- Specified by:
isDmlOnlyin interfaceIDataRouter- Overrides:
isDmlOnlyin classAbstractDataRouter
-