public class TwoPhaseCommitter extends Object
| 构造器和说明 |
|---|
TwoPhaseCommitter(TiConfiguration conf,
long startTime) |
TwoPhaseCommitter(TiConfiguration conf,
long startTime,
long lockTTL,
long txnPrewriteBatchSize,
long txnCommitBatchSize,
int writeBufferSize,
int writeThreadPerTask,
boolean retryCommitSecondaryKeys,
int prewriteMaxRetryTimes) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
commitPrimaryKey(BackOffer backOffer,
byte[] key,
long commitTs)
2pc - commit primary key
|
void |
commitSecondaryKeys(Iterator<ByteWrapper> keys,
long commitTs,
int commitBackOfferMS)
2pc - commit secondary keys
|
void |
prewritePrimaryKey(BackOffer backOffer,
byte[] primaryKey,
byte[] value)
2pc - prewrite primary key
|
void |
prewriteSecondaryKeys(byte[] primaryKey,
Iterator<BytePairWrapper> pairs,
int maxBackOfferMS)
2pc - prewrite secondary keys
|
public TwoPhaseCommitter(TiConfiguration conf, long startTime)
public TwoPhaseCommitter(TiConfiguration conf, long startTime, long lockTTL, long txnPrewriteBatchSize, long txnCommitBatchSize, int writeBufferSize, int writeThreadPerTask, boolean retryCommitSecondaryKeys, int prewriteMaxRetryTimes)
public void prewritePrimaryKey(BackOffer backOffer, byte[] primaryKey, byte[] value) throws TiBatchWriteException
backOffer - primaryKey - value - TiBatchWriteExceptionpublic void commitPrimaryKey(BackOffer backOffer, byte[] key, long commitTs) throws TiBatchWriteException
backOffer - key - TiBatchWriteExceptionpublic void prewriteSecondaryKeys(byte[] primaryKey,
Iterator<BytePairWrapper> pairs,
int maxBackOfferMS)
throws TiBatchWriteException
primaryKey - pairs - TiBatchWriteExceptionpublic void commitSecondaryKeys(Iterator<ByteWrapper> keys, long commitTs, int commitBackOfferMS) throws TiBatchWriteException
keys - commitTs - TiBatchWriteExceptionCopyright © 2022 PingCAP. All rights reserved.