358 final void unregisterPeer(final Object target, final Object peer) { 359 synchronized (activationLock) { 360 synchronized (mainLock) { 361 if (peerMap.get(target) == peer) { 362 peerMap.remove(target); 363 notifyPeerMapUpdated(); 364 } 365 } 366 } 367 } 368 369 final Object getPeer(final Object target) { 370 synchronized (activationLock) { 371 synchronized (mainLock) { 372 return peerMap.get(target); 373 } 374 } 375 } 376 377 final void dumpPeers(final PlatformLogger aLog) { 378 synchronized (activationLock) { 379 synchronized (mainLock) { 380 aLog.fine("Mapped peers:"); 381 for (Object key : peerMap.keySet()) { 382 aLog.fine(key + "->" + peerMap.get(key)); 383 } 384 } 385 } 386 } 387 388 } // class AWTAutoShutdown | 358 final void unregisterPeer(final Object target, final Object peer) { 359 synchronized (activationLock) { 360 synchronized (mainLock) { 361 if (peerMap.get(target) == peer) { 362 peerMap.remove(target); 363 notifyPeerMapUpdated(); 364 } 365 } 366 } 367 } 368 369 final Object getPeer(final Object target) { 370 synchronized (activationLock) { 371 synchronized (mainLock) { 372 return peerMap.get(target); 373 } 374 } 375 } 376 377 final void dumpPeers(final PlatformLogger aLog) { 378 if (aLog.isLoggable(PlatformLogger.FINE)) { 379 synchronized (activationLock) { 380 synchronized (mainLock) { 381 aLog.fine("Mapped peers:"); 382 for (Object key : peerMap.keySet()) { 383 aLog.fine(key + "->" + peerMap.get(key)); 384 } 385 } 386 } 387 } 388 } 389 390 } // class AWTAutoShutdown |