public class MaskStrings extends Object implements ColumnMapper
ColumnMapper
implementation that ensures that string values are masked by a predefined value.Modifier and Type | Class and Description |
---|---|
protected static class |
MaskStrings.MaskingValueConverter |
Modifier and Type | Field and Description |
---|---|
private MaskStrings.MaskingValueConverter |
converter |
Constructor and Description |
---|
MaskStrings(String maskValue)
Create a
ColumnMapper that masks string values with a predefined value. |
Modifier and Type | Method and Description |
---|---|
void |
alterFieldSchema(Column column,
org.apache.kafka.connect.data.SchemaBuilder schemaBuilder)
Optionally annotate the schema with properties to better capture the mapping behavior.
|
ValueConverter |
create(Column column)
Create for the given column a function that maps values.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initialize
private final MaskStrings.MaskingValueConverter converter
public MaskStrings(String maskValue)
ColumnMapper
that masks string values with a predefined value.maskValue
- the value that should be used in place of the actual value; may not be nullIllegalArgumentException
- if the maxLength
is not positivepublic ValueConverter create(Column column)
ColumnMapper
create
in interface ColumnMapper
column
- the column description; never nullpublic void alterFieldSchema(Column column, org.apache.kafka.connect.data.SchemaBuilder schemaBuilder)
ColumnMapper
alterFieldSchema
in interface ColumnMapper
column
- the column definition; never nullschemaBuilder
- the builder for the Field
's schema; never nullCopyright © 2016 JBoss by Red Hat. All rights reserved.