public class TransactionLogSegment extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected static org.slf4j.Logger |
logger |
| 构造器和说明 |
|---|
TransactionLogSegment(KafkaConfig config,
String topic,
short partition,
Produce produce,
Consume consume,
org.joyqueue.network.session.Producer producer,
org.joyqueue.network.session.Consumer consumer) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
batchWrite(String app,
String transactionId,
List<byte[]> bodyList) |
protected org.joyqueue.message.BrokerMessage |
convertMessage(byte[] body) |
protected List<ByteBuffer> |
doRead(short partition,
long index,
int count) |
long |
getIndex() |
short |
getPartition() |
List<TransactionDomain> |
read(long index,
int count) |
void |
saveIndex(long index) |
boolean |
write(String app,
String transactionId,
byte[] body) |
public TransactionLogSegment(KafkaConfig config, String topic, short partition, Produce produce, Consume consume, org.joyqueue.network.session.Producer producer, org.joyqueue.network.session.Consumer consumer)
public long getIndex()
public List<TransactionDomain> read(long index, int count) throws Exception
Exceptionprotected List<ByteBuffer> doRead(short partition, long index, int count) throws Exception
Exceptionpublic boolean batchWrite(String app, String transactionId, List<byte[]> bodyList) throws Exception
Exceptionpublic boolean write(String app, String transactionId, byte[] body) throws Exception
Exceptionprotected org.joyqueue.message.BrokerMessage convertMessage(byte[] body)
public short getPartition()
Copyright © 2020 Joyqueue Community. All rights reserved.