|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.transaction.impl.FilterManager
public final class FilterManager
An object that manages the filtering of notifications. This class can implement optimizations to reduce the effort of filtering notification lists for listeners that have similar filters.
Method Summary | |
---|---|
static FilterManager |
getInstance()
Obtains the singleton instance of this class. |
List<Notification> |
select(List<Notification> notifications,
NotificationFilter filter)
Selects the notifications in the given list that match the specified filter. |
List<Notification> |
select(List<Notification> notifications,
NotificationFilter filter,
ArrayList<Notification> cache)
Selects the notifications in the given list that match the specified filter. |
List<Notification> |
selectUnbatched(List<Notification> notification,
NotificationFilter filter)
Selects the notifications in the given singleton list of an unbatched notification that match the specified filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FilterManager getInstance()
public List<Notification> select(List<Notification> notifications, NotificationFilter filter, ArrayList<Notification> cache)
For unbatched notifications, it is better to use the
selectUnbatched(List, NotificationFilter)
method.
notifications
- a list of notifications to select fromfilter
- a notification filtercache
- A cache list that is precisely the same size as the notifications
list but is used and reused as a scratch pad. Its purpose is to cut down the
number of objects created and garbage collected while propagating filtered
events to a group of listeners. Note that it will be repeatedly cleared and
populated each time it is given to this method.
selectUnbatched(List, NotificationFilter)
public List<Notification> select(List<Notification> notifications, NotificationFilter filter)
For unbatched notifications, it is better to use the
selectUnbatched(List, NotificationFilter)
method.
notifications
- a list of notifications to select fromfilter
- a notification filter
selectUnbatched(List, NotificationFilter)
public List<Notification> selectUnbatched(List<Notification> notification, NotificationFilter filter)
This method is more efficient for processing unbatched notifications than
is the select(List, NotificationFilter)
method.
notification
- a singleton list containing the unbatched
notificationfilter
- a notification filter
select(List, NotificationFilter)
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |