void setDeviceId ( int nDeviceId ) { synchronized ( LOCK ) { // Move this instance inside the HashMaps INSTANCES . get ( connection ( ) ) . remove ( getDeviceId ( ) ) ; INSTANCES . get ( connection ( ) ) . put ( nDeviceId , this ) ; this . deviceId = nDeviceId ; } }
Set the deviceId of the manager to nDeviceId .