Skip to content

Commit

Permalink
Removed unsued code Subscriptions Directory
Browse files Browse the repository at this point in the history
  • Loading branch information
andsel committed Dec 27, 2023
1 parent 1e94601 commit 85f0d2a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

Expand All @@ -38,7 +37,7 @@ public class CTrieSubscriptionDirectory implements ISubscriptionsDirectory {
private CTrie ctrie;
private volatile ISubscriptionsRepository subscriptionsRepository;

private ConcurrentMap<String, List<SharedSubscription>> clientSharedSubscriptions = new ConcurrentHashMap<>();
private final ConcurrentMap<String, List<SharedSubscription>> clientSharedSubscriptions = new ConcurrentHashMap<>();

@Override
public void init(ISubscriptionsRepository subscriptionsRepository) {
Expand Down Expand Up @@ -68,23 +67,6 @@ public void init(ISubscriptionsRepository subscriptionsRepository) {
}
}

// /**
// * @return the set of client ids that has a subscription stored.
// */
// @Override
// public Set<String> listAllSessionIds() {
// final Set<Subscription> subscriptions = subscriptionsRepository.listAllSubscriptions();
// final Set<String> clientIds = new HashSet<>(subscriptions.size());
// for (Subscription subscription : subscriptions) {
// clientIds.add(subscription.clientId);
// }
// return clientIds;
// }

Optional<CNode> lookup(Topic topic) {
return ctrie.lookup(topic);
}

/**
* Given a topic string return the clients subscriptions that matches it. Topic string can't
* contain character # and + because they are reserved to listeners subscriptions, and not topic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public interface ISubscriptionsDirectory {

void init(ISubscriptionsRepository sessionsRepository);

// Set<String> listAllSessionIds();

List<Subscription> matchWithoutQosSharpening(Topic topic);

List<Subscription> matchQosSharpening(Topic topic);
Expand Down

0 comments on commit 85f0d2a

Please sign in to comment.