Module org.elasticsearch.server
Package org.elasticsearch.index.query
Class TermsQueryBuilder.BinaryValues
java.lang.Object
java.util.AbstractCollection
org.elasticsearch.index.query.TermsQueryBuilder.BinaryValues
- All Implemented Interfaces:
Iterable
,Collection
,Writeable
- Enclosing class:
TermsQueryBuilder
public static final class TermsQueryBuilder.BinaryValues
extends AbstractCollection
implements Writeable
Store terms as a
BytesReference
.
When users send a query contain a lot of terms, A BytesReference
can help
gc and reduce the cost of TermsQueryBuilder.doWriteTo(org.elasticsearch.common.io.stream.StreamOutput)
, which can be slow for lots of terms.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Method Summary
Modifier and TypeMethodDescriptionboolean
addAll
(Collection c) void
clear()
boolean
boolean
int
hashCode()
Iterator
<?> iterator()
boolean
boolean
boolean
int
size()
void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.util.AbstractCollection
add, contains, isEmpty, toArray, toArray, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Method Details
-
remove
- Specified by:
remove
in interfaceCollection
- Overrides:
remove
in classAbstractCollection
-
containsAll
- Specified by:
containsAll
in interfaceCollection
- Overrides:
containsAll
in classAbstractCollection
-
addAll
- Specified by:
addAll
in interfaceCollection
- Overrides:
addAll
in classAbstractCollection
-
removeAll
- Specified by:
removeAll
in interfaceCollection
- Overrides:
removeAll
in classAbstractCollection
-
retainAll
- Specified by:
retainAll
in interfaceCollection
- Overrides:
retainAll
in classAbstractCollection
-
clear
public void clear()- Specified by:
clear
in interfaceCollection
- Overrides:
clear
in classAbstractCollection
-
size
public int size()- Specified by:
size
in interfaceCollection
- Specified by:
size
in classAbstractCollection
-
iterator
- Specified by:
iterator
in interfaceCollection
- Specified by:
iterator
in interfaceIterable
- Specified by:
iterator
in classAbstractCollection
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
equals
- Specified by:
equals
in interfaceCollection
- Overrides:
equals
in classObject
-
hashCode
public int hashCode()- Specified by:
hashCode
in interfaceCollection
- Overrides:
hashCode
in classObject
-