public class ShardGroupReader extends Object
| 构造器和说明 |
|---|
ShardGroupReader(String projectName,
String topicName,
ConsumerConfig config)
Shard group reader can dynamically change the shard plan to read
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Close to release resource
|
void |
createShardReader(Map<String,Offset> offsetMap)
Create shard reader
|
Set<String> |
getShards()
Get shards
|
com.aliyun.datahub.client.model.RecordEntry |
read()
Read record
|
void |
removeShardReader(List<String> shardIds)
Remove shard reader
|
void |
waitSignal(long timeout) |
public ShardGroupReader(String projectName, String topicName, ConsumerConfig config)
projectName - The name of project.topicName - The name of topic.config - The consumer config.public com.aliyun.datahub.client.model.RecordEntry read()
public void createShardReader(Map<String,Offset> offsetMap)
offsetMap - The offset map of shard to create readerpublic void removeShardReader(List<String> shardIds)
shardIds - The shard ids of shards to removepublic void close()
public void waitSignal(long timeout)
Copyright © 2020 Alibaba Cloud Computing. All rights reserved.