public void deleteAllNeighboursForced ( Transaction transaction ) throws SIResourceException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "deleteAllNeighboursForced" , new Object [ ] { transaction } ) ; try { _lockManager . lockExclusive ( ) ; Enumeration neighbs = _neighbours . getAllNeighbours ( ) ; while ( neighbs . hasMoreElements ( ) ) { Neighbour neighbour = ( Neighbour ) neighbs . nextElement ( ) ; // Force remove the Neighbour _neighbours . removeNeighbour ( neighbour . getUUID ( ) , neighbour . getBusId ( ) , transaction ) ; } neighbs = _neighbours . getAllRecoveredNeighbours ( ) ; while ( neighbs . hasMoreElements ( ) ) { Neighbour neighbour = ( Neighbour ) neighbs . nextElement ( ) ; // Force remove the Neighbour _neighbours . removeNeighbour ( neighbour . getUUID ( ) , neighbour . getBusId ( ) , transaction ) ; } } finally { _lockManager . unlockExclusive ( ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc , "deleteAllNeighboursForced" ) ; }
This is purely for unittests . Many unittests dont cleanup their neighbours so we now need this to ensure certain tests are clean before starting .