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
|
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.Level.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
|