E
- the type of entries being indexed.public final class Bitmap<E> extends Object
E
. Each indexed entry is uniquely identified by its unique
long
key provided externally.
Internally, each bitmap manages a set of sparse bit sets, one for each
possible attribute value, and a sparse array to map from unique long
entry keys back to entries.
Constructor and Description |
---|
Bitmap() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears this bitmap.
|
Iterator<E> |
evaluate(Predicate predicate,
TypeConverter converter)
Evaluates the given predicate while converting the predicate arguments
using the given converter.
|
void |
insert(Iterator values,
long key,
E entry)
Inserts the given values associated with the given entry having the given
unique key.
|
void |
remove(Iterator values,
long key)
Removes the given values associated with an entry identified by the given
unique key.
|
void |
update(Iterator oldValues,
Iterator newValues,
long key,
E entry)
Updates the given old values to the given new values associated with the
given entry having the given unique key.
|
public void insert(Iterator values, long key, E entry)
values
- the values to insert.key
- the unique key of the entry being inserted.entry
- the entry to insert.public void update(Iterator oldValues, Iterator newValues, long key, E entry)
oldValues
- the old values to replace.newValues
- the new values to replace with.key
- the unique key of the entry being updated.entry
- the entry to update.public void remove(Iterator values, long key)
values
- the values to remove.key
- the unique key of an entry being removed.public void clear()
public Iterator<E> evaluate(Predicate predicate, TypeConverter converter)
The following predicates (and combinations of them) are supported:
AndPredicate
, OrPredicate
, NotPredicate
, NotEqualPredicate
, EqualPredicate
, InPredicate
.
predicate
- the predicate to evaluate.converter
- the converter to use for the predicate arguments
conversion.Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.