public final class IndexTreeBuilder extends Object
FilterHandleSetNode
and FilterParamIndexBase
instances.
Filters can be added to a top node (an instance of FilterHandleSetNode) via the add method. This method returns
an instance of EventTypeIndexBuilderIndexLookupablePair
which represents an element in the tree path (list of indizes) that the filter callback was
added to. To remove filters the same IndexTreePath instance must be passed in.
The implementation is designed to be multithread-safe in conjunction with the node classes manipulated by this class.
Modifier and Type | Method and Description |
---|---|
static ArrayDeque<EventTypeIndexBuilderIndexLookupablePair>[] |
add(FilterValueSet filterValueSet,
FilterHandle filterCallback,
FilterHandleSetNode topNode,
FilterServiceGranularLockFactory lockFactory)
Add a filter callback according to the filter specification to the top node returning
information to be used to remove the filter callback.
|
static void |
remove(EventType eventType,
FilterHandle filterCallback,
EventTypeIndexBuilderIndexLookupablePair[] treePathInfo,
FilterHandleSetNode topNode)
Remove an filterCallback from the given top node.
|
public static ArrayDeque<EventTypeIndexBuilderIndexLookupablePair>[] add(FilterValueSet filterValueSet, FilterHandle filterCallback, FilterHandleSetNode topNode, FilterServiceGranularLockFactory lockFactory)
filterValueSet
- is the filter definitionfilterCallback
- is the callback to be addedtopNode
- node to be added to any subnode beneath itlockFactory
- lock factorypublic static void remove(EventType eventType, FilterHandle filterCallback, EventTypeIndexBuilderIndexLookupablePair[] treePathInfo, FilterHandleSetNode topNode)
filterCallback
- filter callback to be removedtreePathInfo
- encapsulates information need to allow for safe removal of the filterCallbacktopNode
- The top tree node beneath which the filterCallback was addedeventType
- event type