public class RegionCDCClient extends Object implements AutoCloseable, org.tikv.shade.io.grpc.stub.StreamObserver<org.tikv.kvproto.Cdcpb.ChangeDataEvent>
Constructor and Description |
---|
RegionCDCClient(org.tikv.common.region.TiRegion region,
org.tikv.kvproto.Coprocessor.KeyRange keyRange,
org.tikv.shade.io.grpc.ManagedChannel channel,
java.util.function.Consumer<org.tikv.cdc.CDCEvent> eventConsumer,
org.tikv.cdc.CDCConfig config) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.tikv.kvproto.Coprocessor.KeyRange |
getKeyRange() |
org.tikv.common.region.TiRegion |
getRegion() |
org.tikv.kvproto.Coprocessor.KeyRange |
getRegionKeyRange() |
boolean |
isRunning() |
void |
onCompleted() |
void |
onError(Throwable error) |
void |
onNext(org.tikv.kvproto.Cdcpb.ChangeDataEvent event) |
boolean |
regionEnclosed() |
void |
setRegion(org.tikv.common.region.TiRegion region) |
void |
start(long startTs) |
public RegionCDCClient(org.tikv.common.region.TiRegion region, org.tikv.kvproto.Coprocessor.KeyRange keyRange, org.tikv.shade.io.grpc.ManagedChannel channel, java.util.function.Consumer<org.tikv.cdc.CDCEvent> eventConsumer, org.tikv.cdc.CDCConfig config)
public void start(long startTs)
public org.tikv.common.region.TiRegion getRegion()
public void setRegion(org.tikv.common.region.TiRegion region)
public org.tikv.kvproto.Coprocessor.KeyRange getKeyRange()
public org.tikv.kvproto.Coprocessor.KeyRange getRegionKeyRange()
public boolean regionEnclosed()
public boolean isRunning()
public void close() throws Exception
close
in interface AutoCloseable
Exception
public void onCompleted()
onCompleted
in interface org.tikv.shade.io.grpc.stub.StreamObserver<org.tikv.kvproto.Cdcpb.ChangeDataEvent>
public void onError(Throwable error)
onError
in interface org.tikv.shade.io.grpc.stub.StreamObserver<org.tikv.kvproto.Cdcpb.ChangeDataEvent>
public void onNext(org.tikv.kvproto.Cdcpb.ChangeDataEvent event)
onNext
in interface org.tikv.shade.io.grpc.stub.StreamObserver<org.tikv.kvproto.Cdcpb.ChangeDataEvent>
Copyright © 2024 The Apache Software Foundation. All rights reserved.