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 String
static final String
protected ISymmetricDialect
protected ISymmetricEngine
protected final String
Fields inherited from class org.jumpmind.symmetric.route.AbstractDataRouter
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IDataRouter
getCompiledClass
(SimpleRouterContext context, Router router) boolean
Override 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:
routeToNodes
in interfaceIDataRouter
-
getCompiledClass
- Throws:
Exception
-
isDmlOnly
public boolean isDmlOnly()Description copied from class:AbstractDataRouter
Override if a router is able to route non-DML DataEventTypes.- Specified by:
isDmlOnly
in interfaceIDataRouter
- Overrides:
isDmlOnly
in classAbstractDataRouter
-