File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -120,18 +120,15 @@ public class PersistentSubscription extends AbstractSubscription implements Subs
120120 // Map of properties that is used to mark this subscription as "replicated".
121121 // Since this is the only field at this point, we can just keep a static
122122 // instance of the map.
123- private static final Map <String , Long > REPLICATED_SUBSCRIPTION_CURSOR_PROPERTIES = new TreeMap <>();
124- private static final Map <String , Long > NON_REPLICATED_SUBSCRIPTION_CURSOR_PROPERTIES = Collections .emptyMap ();
123+ private static final Map <String , Long > REPLICATED_SUBSCRIPTION_CURSOR_PROPERTIES =
124+ Map .of (REPLICATED_SUBSCRIPTION_PROPERTY , 1L );
125+ private static final Map <String , Long > NON_REPLICATED_SUBSCRIPTION_CURSOR_PROPERTIES = Map .of ();
125126
126127 private volatile ReplicatedSubscriptionSnapshotCache replicatedSubscriptionSnapshotCache ;
127128 private final PendingAckHandle pendingAckHandle ;
128129 private volatile Map <String , String > subscriptionProperties ;
129130 private volatile CompletableFuture <Void > fenceFuture ;
130131
131- static {
132- REPLICATED_SUBSCRIPTION_CURSOR_PROPERTIES .put (REPLICATED_SUBSCRIPTION_PROPERTY , 1L );
133- }
134-
135132 static Map <String , Long > getBaseCursorProperties (boolean isReplicated ) {
136133 return isReplicated ? REPLICATED_SUBSCRIPTION_CURSOR_PROPERTIES : NON_REPLICATED_SUBSCRIPTION_CURSOR_PROPERTIES ;
137134 }
You can’t perform that action at this time.
0 commit comments