public class CdcSourceTaskContext extends Object
SourceTask implementations.| Modifier and Type | Field and Description |
|---|---|
private Clock |
clock |
private Supplier<Collection<? extends DataCollectionId>> |
collectionsSupplier
Obtains the data collections captured at the point of invocation.
|
private String |
connectorName |
private String |
connectorType |
| Constructor and Description |
|---|
CdcSourceTaskContext(String connectorType,
String connectorName,
Supplier<Collection<? extends DataCollectionId>> collectionsSupplier) |
| Modifier and Type | Method and Description |
|---|---|
String[] |
capturedDataCollections() |
LoggingContext.PreviousContext |
configureLoggingContext(String contextName)
Configure the logger's Mapped Diagnostic Context (MDC) properties for the thread making this call.
|
Clock |
getClock()
Returns a clock for obtaining the current time.
|
String |
getConnectorName() |
String |
getConnectorType() |
void |
temporaryLoggingContext(CommonConnectorConfig connectorConfig,
String contextName,
Runnable operation)
Run the supplied function in the temporary connector MDC context, and when complete always return the MDC context to its
state before this method was called.
|
private final String connectorType
private final String connectorName
private final Clock clock
private final Supplier<Collection<? extends DataCollectionId>> collectionsSupplier
public CdcSourceTaskContext(String connectorType, String connectorName, Supplier<Collection<? extends DataCollectionId>> collectionsSupplier)
public LoggingContext.PreviousContext configureLoggingContext(String contextName)
contextName - the name of the context; may not be nullIllegalArgumentException - if contextName is nullpublic void temporaryLoggingContext(CommonConnectorConfig connectorConfig, String contextName, Runnable operation)
connectorConfig - the configuration of the connector; may not be nullcontextName - the name of the context; may not be nulloperation - the function to run in the new MDC context; may not be nullIllegalArgumentException - if any of the parameters are nullpublic Clock getClock()
public String[] capturedDataCollections()
public String getConnectorType()
public String getConnectorName()
Copyright © 2021 JBoss by Red Hat. All rights reserved.