void addTopicSpaceReference ( SIBUuid8 neighbourUuid , SIBUuid12 topicSpace , String topic , boolean warmRestarted ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "addTopicSpaceReference" , new Object [ ] { neighbourUuid , topicSpace , topic , new Boolean ( warmRestarted ) } ) ; // Synchronize around the topic space references to stop removal and // additions occuring at the same time. synchronized ( _topicSpaces ) { // From the list of topic spaces, get the HashMap that contains the // list of topicSpaces to topics. TemporarySubscription sub = ( TemporarySubscription ) _topicSpaces . get ( topicSpace ) ; Neighbour neighbour = null ; // If the ME has warm restarted, then the Neighbour object will actually // be in the recoveredNeighbours instance. if ( warmRestarted ) { synchronized ( _recoveredNeighbours ) { neighbour = ( Neighbour ) _recoveredNeighbours . get ( neighbourUuid ) ; } } else neighbour = getNeighbour ( neighbourUuid ) ; MESubscription subscription = neighbour . getSubscription ( topicSpace , topic ) ; if ( sub == null ) { // Consruct a new TemporarySubscription object. sub = new TemporarySubscription ( neighbourUuid , subscription ) ; // Put the topic space reference into the list of topic // spaces, keyed on the topic space. _topicSpaces . put ( topicSpace , sub ) ; } else { // Add a topic to the list of topics on this topic space for this ME sub . addTopic ( neighbourUuid , subscription ) ; } } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "addTopicSpaceReference" ) ; }
When the Destination manager doesn t know about a Destination the topic space reference is created here until either the proxy is deleted or the topic space is created .