public class RunnableBatch<T> extends java.lang.Object implements MaskingBatch<T>, java.lang.Runnable
| Constructor and Description |
|---|
RunnableBatch(MaskingAlgorithm<T> algorithmIn)
Create a runnable batch associated with a particular algorithm.
|
RunnableBatch(MaskingAlgorithm<T> algorithmIn,
int batchSize)
Create a runnable batch associated with a particular algorithm.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T item)
Add new value to be masked to the batch.
|
void |
clear()
Reset the batch.
|
java.util.List<T> |
getAllValues()
Get the masked value list associated with this batch.
|
java.lang.Exception |
getError(int index)
Get the error that occurred when masking a particular item in a batch.
|
T |
getValue(int index)
Get the value to be masked at a particular index from the batch.
|
void |
run()
Run the batch.
|
void |
setError(int index,
MaskingException e)
Set the error that occurred when masking a particular item in a batch.
|
void |
setGeneralError(java.lang.Exception e)
This method is called when a general failure occurs with the algorithm.
|
void |
setValue(int index,
T value)
Set the masking result at a particular index in the batch.
|
int |
size()
Get the size of the batch.
|
public RunnableBatch(MaskingAlgorithm<T> algorithmIn)
algorithmIn - The algorithm to use when running the batch.public RunnableBatch(MaskingAlgorithm<T> algorithmIn, int batchSize)
algorithmIn - The algorithm to use when running the batch.batchSize - The initial size of the batch.public T getValue(int index)
MaskingBatchgetValue in interface MaskingBatch<T>index - The index of the value to get, in the range of 0 to size - 1public java.util.List<T> getAllValues()
public void setValue(int index,
T value)
MaskingBatchsetValue in interface MaskingBatch<T>index - The index of the value to set, in the range of 0 to size - 1value - The masked valuepublic java.lang.Exception getError(int index)
index - The index of value that was being masked when the error occurred, in the range
of 0 to size - 1public void setError(int index,
@Nonnull
MaskingException e)
MaskingBatchMaskingAlgorithm.maskBatch(com.delphix.masking.api.plugin.MaskingBatch<T>).setError in interface MaskingBatch<T>index - The index of value that was being masked when the error occurred, in the range
of 0 to size - 1e - The error that occurred.public void setGeneralError(java.lang.Exception e)
e - The error that occurredpublic void clear()
public int size()
MaskingBatchsize in interface MaskingBatch<T>public void add(T item)
item - The value to be maskedpublic void run()
run in interface java.lang.Runnable