Use the convenience creation methods on ObserverList

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6604 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Charlie Groves
2011-04-05 21:01:02 +00:00
parent ddb30e640e
commit c5a098119f
6 changed files with 11 additions and 16 deletions
@@ -1463,12 +1463,10 @@ public class ChatDirector extends BasicDirector
protected boolean _mogrifyChat= true;
/** A list of registered chat displays. */
protected ObserverList<ChatDisplay> _displays =
new ObserverList<ChatDisplay>(ObserverList.SAFE_IN_ORDER_NOTIFY);
protected ObserverList<ChatDisplay> _displays = ObserverList.newSafeInOrder();
/** A list of registered chat filters. */
protected ObserverList<ChatFilter> _filters =
new ObserverList<ChatFilter>(ObserverList.SAFE_IN_ORDER_NOTIFY);
protected ObserverList<ChatFilter> _filters = ObserverList.newSafeInOrder();
/** A mapping from auxiliary chat objects to the types under which
* they are registered. */
@@ -1481,8 +1479,7 @@ public class ChatDirector extends BasicDirector
protected LinkedList<Name> _chatters = new LinkedList<Name>();
/** Observers that are watching our chatters list. */
protected ObserverList<ChatterObserver> _chatterObservers =
new ObserverList<ChatterObserver>(ObserverList.SAFE_IN_ORDER_NOTIFY);
protected ObserverList<ChatterObserver> _chatterObservers = ObserverList.newSafeInOrder();
/** Operation used to filter chat messages. */
protected FilterMessageOp _filterMessageOp = new FilterMessageOp();
@@ -189,6 +189,5 @@ public class MuteDirector extends BasicDirector
protected HashSet<Name> _mutelist = Sets.newHashSet();
/** List of mutelist observers. */
protected ObserverList<MuteObserver> _observers =
new ObserverList<MuteObserver>(ObserverList.FAST_UNSAFE_NOTIFY);
protected ObserverList<MuteObserver> _observers = ObserverList.newFastUnsafe();
}
@@ -580,8 +580,7 @@ public class LocationDirector extends BasicDirector
protected LocationService _lservice;
/** Our location observer list. */
protected ObserverList<LocationObserver> _observers = new ObserverList<LocationObserver>(
ObserverList.SAFE_IN_ORDER_NOTIFY);
protected ObserverList<LocationObserver> _observers = ObserverList.newSafeInOrder();
/** Used to subscribe to our place object. */
protected SafeSubscriber<PlaceObject> _subber;
@@ -875,7 +875,7 @@ public abstract class PeerManager
{
ObserverList<StaleCacheObserver> list = _cacheobs.get(cache);
if (list == null) {
list = new ObserverList<StaleCacheObserver>(ObserverList.FAST_UNSAFE_NOTIFY);
list = ObserverList.newFastUnsafe();
_cacheobs.put(cache, list);
}
list.add(observer);
@@ -231,7 +231,7 @@ public class ClientManager
{
_clobservers.remove(observer);
if (observer instanceof DetailedClientObserver) {
_dclobservers.remove(observer);
_dclobservers.remove((DetailedClientObserver)observer);
}
}