com.hazelcast.query.impl
Class QueryEntry
java.lang.Object
com.hazelcast.query.impl.QueryEntry
- All Implemented Interfaces:
- QueryableEntry, QueryResultEntry, Map.Entry
public class QueryEntry
- extends Object
- implements QueryableEntry
Entry of the Query.
QueryEntry
public QueryEntry()
QueryEntry
public QueryEntry(SerializationService serializationService,
Data indexKey,
Object key,
Object value)
init
public void init(SerializationService serializationService,
Data indexKey,
Object key,
Object value)
- It may be useful to use this
init
method in some cases that same instance of this class can be used
instead of creating a new one for every iteration when scanning large data sets, for example:
Predicate predicate = ...
QueryEntry entry = new QueryEntry()
for(i == 0; i < HUGE_NUMBER; i++) {
entry.init(...)
boolean valid = predicate.apply(queryEntry);
if(valid) {
....
}
}
getValue
public Object getValue()
- Specified by:
getValue
in interface QueryableEntry
- Specified by:
getValue
in interface Map.Entry
getKey
public Object getKey()
- Specified by:
getKey
in interface QueryableEntry
- Specified by:
getKey
in interface Map.Entry
getAttribute
public Comparable getAttribute(String attributeName)
throws QueryException
- Specified by:
getAttribute
in interface QueryableEntry
- Throws:
QueryException
getAttributeType
public AttributeType getAttributeType(String attributeName)
- Specified by:
getAttributeType
in interface QueryableEntry
isKey
public boolean isKey(String attributeName)
getKeyData
public Data getKeyData()
- Specified by:
getKeyData
in interface QueryResultEntry
getValueData
public Data getValueData()
- Specified by:
getValueData
in interface QueryResultEntry
getIndexKey
public Data getIndexKey()
- Specified by:
getIndexKey
in interface QueryResultEntry
setValue
public Object setValue(Object value)
- Specified by:
setValue
in interface Map.Entry
equals
public boolean equals(Object o)
- Specified by:
equals
in interface Map.Entry
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Specified by:
hashCode
in interface Map.Entry
- Overrides:
hashCode
in class Object
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.