类 PersistentAcknowledgmentsGroupingTracker
java.lang.Object
org.apache.pulsar.client.impl.PersistentAcknowledgmentsGroupingTracker
- 所有已实现的接口:
AutoCloseable,AcknowledgmentsGroupingTracker
public class PersistentAcknowledgmentsGroupingTracker
extends Object
implements AcknowledgmentsGroupingTracker
Group the acknowledgements for a certain time and then sends them out in a single protobuf command.
-
构造器概要
构造器构造器说明PersistentAcknowledgmentsGroupingTracker(ConsumerImpl<?> consumer, ConsumerConfigurationData<?> conf, io.netty.channel.EventLoopGroup eventLoopGroup) -
方法概要
修饰符和类型方法说明addAcknowledgment(MessageId msgId, CommandAck.AckType ackType, Map<String, Long> properties) addListAcknowledgment(List<MessageId> messageIds, CommandAck.AckType ackType, Map<String, Long> properties) voidclose()voidflush()Flush all the pending acks and send them to the broker.voidbooleanisDuplicate(MessageId messageId) Since the ack are delayed, we need to do some best-effort duplicate check to discard messages that are being resent after a disconnection and for which the user has already sent an acknowledgement.
-
构造器详细资料
-
PersistentAcknowledgmentsGroupingTracker
public PersistentAcknowledgmentsGroupingTracker(ConsumerImpl<?> consumer, ConsumerConfigurationData<?> conf, io.netty.channel.EventLoopGroup eventLoopGroup)
-
-
方法详细资料
-
isDuplicate
Since the ack are delayed, we need to do some best-effort duplicate check to discard messages that are being resent after a disconnection and for which the user has already sent an acknowledgement.- 指定者:
isDuplicate在接口中AcknowledgmentsGroupingTracker
-
addListAcknowledgment
public CompletableFuture<Void> addListAcknowledgment(List<MessageId> messageIds, CommandAck.AckType ackType, Map<String, Long> properties) -
addAcknowledgment
public CompletableFuture<Void> addAcknowledgment(MessageId msgId, CommandAck.AckType ackType, Map<String, Long> properties) -
flush
public void flush()Flush all the pending acks and send them to the broker.- 指定者:
flush在接口中AcknowledgmentsGroupingTracker
-
flushAndClean
public void flushAndClean()- 指定者:
flushAndClean在接口中AcknowledgmentsGroupingTracker
-
close
public void close()- 指定者:
close在接口中AcknowledgmentsGroupingTracker- 指定者:
close在接口中AutoCloseable
-
acquireReadLock
-
acquireWriteLock
-