use of org.apache.pulsar.client.impl.ProducerImpl in project incubator-pulsar by apache.
the class PersistentReplicator method getStats.
public ReplicatorStats getStats() {
stats.replicationBacklog = cursor.getNumberOfEntriesInBacklog();
stats.connected = producer != null && producer.isConnected();
stats.replicationDelayInSeconds = getReplicationDelayInSeconds();
ProducerImpl producer = this.producer;
if (producer != null) {
stats.outboundConnection = producer.getConnectionId();
stats.outboundConnectedSince = producer.getConnectedSince();
} else {
stats.outboundConnection = null;
stats.outboundConnectedSince = null;
}
return stats;
}
use of org.apache.pulsar.client.impl.ProducerImpl in project incubator-pulsar by apache.
the class NonPersistentReplicator method getStats.
@Override
public NonPersistentReplicatorStats getStats() {
stats.connected = producer != null && producer.isConnected();
stats.replicationDelayInSeconds = getReplicationDelayInSeconds();
ProducerImpl producer = this.producer;
if (producer != null) {
stats.outboundConnection = producer.getConnectionId();
stats.outboundConnectedSince = producer.getConnectedSince();
} else {
stats.outboundConnection = null;
stats.outboundConnectedSince = null;
}
return stats;
}
Aggregations