Upgraded to hppc version 0.5.3
This commit is contained in:
parent
a305fb08d6
commit
9fdcb0ad05
2
pom.xml
2
pom.xml
|
@ -172,7 +172,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.carrotsearch</groupId>
|
<groupId>com.carrotsearch</groupId>
|
||||||
<artifactId>hppc</artifactId>
|
<artifactId>hppc</artifactId>
|
||||||
<version>0.5.2</version>
|
<version>0.5.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
@ -190,6 +190,11 @@ public final class ImmutableOpenMap<KType, VType> implements Iterable<ObjectObje
|
||||||
return map.get(key);
|
return map.get(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VType getOrDefault(KType kType, VType vType) {
|
||||||
|
return map.getOrDefault(kType, vType);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int putAll(ObjectObjectAssociativeContainer<? extends KType, ? extends VType> container) {
|
public int putAll(ObjectObjectAssociativeContainer<? extends KType, ? extends VType> container) {
|
||||||
return map.putAll(container);
|
return map.putAll(container);
|
||||||
|
|
|
@ -59,13 +59,7 @@ public class SimpleIdReaderTypeCache implements IdReaderTypeCache {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int docById(HashedBytesArray uid) {
|
public int docById(HashedBytesArray uid) {
|
||||||
if (idToDoc.containsKey(uid)) {
|
return idToDoc.getOrDefault(uid, -1);
|
||||||
// We can't use #lget() here since the idToDoc map shared across threads, so we really need a second lookup...
|
|
||||||
// BTW: This method is only used via TopChildrenQuery
|
|
||||||
return idToDoc.get(uid);
|
|
||||||
} else {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashedBytesArray idByDoc(int docId) {
|
public HashedBytesArray idByDoc(int docId) {
|
||||||
|
|
Loading…
Reference in New Issue