Skip to content

Commit

Permalink
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
*/
package org.apache.pulsar.broker.service.nonpersistent;

import com.google.common.base.MoreObjects;

import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;

import com.google.common.base.MoreObjects;
import org.apache.bookkeeper.mledger.Entry;
import org.apache.bookkeeper.mledger.Position;
import org.apache.bookkeeper.mledger.impl.PositionImpl;
Expand All @@ -50,6 +49,7 @@ public class NonPersistentSubscription implements Subscription {
private volatile NonPersistentDispatcher dispatcher;
private final String topicName;
private final String subName;
private final String fullName;

private static final int FALSE = 0;
private static final int TRUE = 1;
Expand All @@ -62,6 +62,7 @@ public NonPersistentSubscription(NonPersistentTopic topic, String subscriptionNa
this.topic = topic;
this.topicName = topic.getName();
this.subName = subscriptionName;
this.fullName = MoreObjects.toStringHelper(this).add("topic", topicName).add("name", subName).toString();
IS_FENCED_UPDATER.set(this, FALSE);
}

Expand Down Expand Up @@ -155,7 +156,7 @@ public void acknowledgeMessage(List<Position> position, AckType ackType, Map<Str

@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("topic", topicName).add("name", subName).toString();
return fullName;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import static com.google.common.base.Preconditions.checkArgument;

import com.google.common.base.MoreObjects;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
Expand All @@ -33,6 +31,7 @@
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import java.util.stream.Collectors;

import com.google.common.base.MoreObjects;
import org.apache.bookkeeper.mledger.AsyncCallbacks;
import org.apache.bookkeeper.mledger.AsyncCallbacks.ClearBacklogCallback;
import org.apache.bookkeeper.mledger.AsyncCallbacks.DeleteCallback;
Expand Down Expand Up @@ -77,6 +76,7 @@ public class PersistentSubscription implements Subscription {
protected volatile Dispatcher dispatcher;
protected final String topicName;
protected final String subName;
protected final String fullName;

private static final int FALSE = 0;
private static final int TRUE = 1;
Expand Down Expand Up @@ -139,6 +139,7 @@ public PersistentSubscription(PersistentTopic topic, String subscriptionName, Ma
this.cursor = cursor;
this.topicName = topic.getName();
this.subName = subscriptionName;
this.fullName = MoreObjects.toStringHelper(this).add("topic", topicName).add("name", subName).toString();;
this.expiryMonitor = new PersistentMessageExpiryMonitor(topicName, subscriptionName, cursor);
this.setReplicated(replicated);
IS_FENCED_UPDATER.set(this, FALSE);
Expand Down Expand Up @@ -470,7 +471,7 @@ public void deleteFailed(ManagedLedgerException exception, Object ctx) {

@Override
public String toString() {
return MoreObjects.toStringHelper(this).add("topic", topicName).add("name", subName).toString();
return fullName;
}

@Override
Expand Down

0 comments on commit 35f7590

Please sign in to comment.