Class DmlBatchSender
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.h2.dml.DmlBatchSender
-
public class DmlBatchSender extends Object
Batch sender class.
-
-
Constructor Summary
Constructors Constructor Description DmlBatchSender(GridCacheContext cctx, int size, int qryNum)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Object key, javax.cache.processor.EntryProcessor<Object,Object,Boolean> proc, int rowNum)Add entry to batch.SQLExceptionerror()List<Object>failedKeys()voidflush()Flush any remaining entries.int[]perRowCounterAsArray()Returns per row updates counter as array.ClusterNodeprimaryNodeByKey(Object key)voidsetFailed(int rowNum)Sets row as failed.longupdateCount()
-
-
-
Constructor Detail
-
DmlBatchSender
public DmlBatchSender(GridCacheContext cctx, int size, int qryNum)
Constructor.- Parameters:
cctx- Cache context.size- Batch.qryNum- Number of queries.
-
-
Method Detail
-
add
public void add(Object key, javax.cache.processor.EntryProcessor<Object,Object,Boolean> proc, int rowNum) throws IgniteCheckedException
Add entry to batch.- Parameters:
key- Key.proc- Processor.rowNum- Row number.- Throws:
IgniteCheckedException- If failed.
-
primaryNodeByKey
public ClusterNode primaryNodeByKey(Object key) throws IgniteCheckedException
- Parameters:
key- Key.- Returns:
- Primary node for given key.
- Throws:
IgniteCheckedException- If primary node is not found.
-
flush
public void flush()
Flush any remaining entries.
-
updateCount
public long updateCount()
- Returns:
- Update count.
-
error
public SQLException error()
- Returns:
- Error.
-
perRowCounterAsArray
public int[] perRowCounterAsArray()
Returns per row updates counter as array.- Returns:
- Per row updates counter as array.
-
setFailed
public void setFailed(int rowNum)
Sets row as failed.- Parameters:
rowNum- Row number.
-
-