public class XstreamStreamingChangeEventSource extends Object implements StreamingChangeEventSource
StreamingChangeEventSource based on Oracle's XStream API. The XStream event handler loop is executed in a
separate executor.| Modifier and Type | Class and Description |
|---|---|
static class |
XstreamStreamingChangeEventSource.PositionAndScn |
ChangeEventSource.ChangeEventSourceContext| Modifier and Type | Field and Description |
|---|---|
private Clock |
clock |
private EventDispatcher<TableId> |
dispatcher |
private ErrorHandler |
errorHandler |
private OracleConnection |
jdbcConnection |
private AtomicReference<XstreamStreamingChangeEventSource.PositionAndScn> |
lcrMessage
A message box between thread that is informed about committed offsets and the XStream thread.
|
private static org.slf4j.Logger |
LOGGER |
private OracleOffsetContext |
offsetContext |
private int |
posVersion |
private OracleDatabaseSchema |
schema |
private boolean |
tablenameCaseInsensitive |
private oracle.streams.XStreamOut |
xsOut |
private String |
xStreamServerName |
| Constructor and Description |
|---|
XstreamStreamingChangeEventSource(OracleConnectorConfig connectorConfig,
OracleOffsetContext offsetContext,
OracleConnection jdbcConnection,
EventDispatcher<TableId> dispatcher,
ErrorHandler errorHandler,
Clock clock,
OracleDatabaseSchema schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
commitOffset(Map<String,?> offset) |
private byte[] |
convertScnToPosition(Scn scn) |
void |
execute(ChangeEventSource.ChangeEventSourceContext context) |
(package private) oracle.streams.XStreamOut |
getXsOut() |
(package private) XstreamStreamingChangeEventSource.PositionAndScn |
receivePublishedPosition() |
private static int |
resolvePosVersion(OracleConnection connection,
OracleConnectorConfig connectorConfig) |
private void |
sendPublishedPosition(LcrPosition lcrPosition,
Scn scn) |
private static final org.slf4j.Logger LOGGER
private final OracleConnection jdbcConnection
private final EventDispatcher<TableId> dispatcher
private final ErrorHandler errorHandler
private final Clock clock
private final OracleDatabaseSchema schema
private final OracleOffsetContext offsetContext
private final String xStreamServerName
private volatile oracle.streams.XStreamOut xsOut
private final boolean tablenameCaseInsensitive
private final int posVersion
private final AtomicReference<XstreamStreamingChangeEventSource.PositionAndScn> lcrMessage
public XstreamStreamingChangeEventSource(OracleConnectorConfig connectorConfig, OracleOffsetContext offsetContext, OracleConnection jdbcConnection, EventDispatcher<TableId> dispatcher, ErrorHandler errorHandler, Clock clock, OracleDatabaseSchema schema)
public void execute(ChangeEventSource.ChangeEventSourceContext context) throws InterruptedException
execute in interface StreamingChangeEventSourceInterruptedExceptionpublic void commitOffset(Map<String,?> offset)
commitOffset in interface StreamingChangeEventSourceprivate byte[] convertScnToPosition(Scn scn)
oracle.streams.XStreamOut getXsOut()
private void sendPublishedPosition(LcrPosition lcrPosition, Scn scn)
XstreamStreamingChangeEventSource.PositionAndScn receivePublishedPosition()
private static int resolvePosVersion(OracleConnection connection, OracleConnectorConfig connectorConfig)
Copyright © 2021 JBoss by Red Hat. All rights reserved.