[ https://issues.apache.org/jira/browse/QPID-7658?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15851372#comment-15851372 ]
Rob Godfrey commented on QPID-7658: ----------------------------------- It just seems like an accident waiting to happen - if the "localContainerId" is ever anything but the container id of the virtual host, what does that mean? A couple of random thoughts: * should the link registry also record some sort of ttl for the links... i.e. if a client never reconnects is it not the link registry's job to remove the link from itself... or are you expecting that the link registry will do a deep inspection of the local teminus to determine when it should auto-remove the link * you don't provide an explicit mechanism for updating the data in the registry ... are the terminii objects immutable? If not how does the registry know when the state of the terminii has changed and from that whether the change requires persisting Personally I still feel your model is wrong in that I think there is a Link object that encapsulates the local terminus, the remote terminus, and the link endpoint (if any) currently associated with the local terminus. > [Java Broker] Improve LinkRegistry > ---------------------------------- > > Key: QPID-7658 > URL: https://issues.apache.org/jira/browse/QPID-7658 > Project: Qpid > Issue Type: Task > Components: Java Broker > Reporter: Lorenz Quack > Fix For: qpid-java-7.0 > > > Currently the AbstractVirtualHost has a Map<remoteContainerId, LinkRegistry>. > The handling of the remoteContainerId should also be encapsulated in the > LinkRegistry giving each VH only a single LinkRegistry. > Furthermore the following change to the LinkRegistry is proposed: > * LinkRegistry.putSendingLinkIfAbsent(String localContainerId, String > remoteContrainerId, String linkName, Source source, Target target) -> > Pair<Source, Target> > * LinkRegistry.putReceivingLinkIfAbsent(String localContainerId, String > remoteContrainerId, String linkName, Source source, Target target) -> > Pair<Source, Target> > * LinkRegistry.getSendvingLink(String localContainerId, String > remoteContrainerId, String linkName) -> Pair<Source, Target> > * LinkRegistry.getReceivingLink(String localContainerId, String > remoteContrainerId, String linkName) -> Pair<Source, Target> > * LinkRegistry.removeSendingLink(String localContainerId, String > remoteContrainerId, String linkName) -> Pair<Source, Target> > * LinkRegistry.removeReceivingLink(String localContainerId, String > remoteContrainerId, String linkName) -> Pair<Source, Target> > The implementation of which must be thread-safe because the LinkRegistry will > be accessed on multiple threads concurrently. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org