Package com.illumon.iris.db.v2.hashing
Class ObjectArrayChunkHasher
java.lang.Object
com.illumon.iris.db.v2.hashing.ObjectArrayChunkHasher
- All Implemented Interfaces:
ChunkHasher
public class ObjectArrayChunkHasher extends Object implements ChunkHasher
-
Field Summary
Fields Modifier and Type Field Description static ObjectArrayChunkHasher
INSTANCE
-
Constructor Summary
Constructors Constructor Description ObjectArrayChunkHasher()
-
Method Summary
Modifier and Type Method Description void
hashInitial(Chunk<Attributes.Values> values, WritableIntChunk<Attributes.HashCode> destination)
Called for the first (or only) hash value, sets the hash codes in destination corresponding to values.int
hashInitial(Object value)
Hash a boxed object.int
hashUpdate(int existing, Object value)
Update a hash for a boxed object.void
hashUpdate(Chunk<Attributes.Values> values, WritableIntChunk<Attributes.HashCode> destination)
Called for subsequent hash values, updates the hash codes in destination corresponding to values.
-
Field Details
-
Constructor Details
-
ObjectArrayChunkHasher
public ObjectArrayChunkHasher()
-
-
Method Details
-
hashInitial
Description copied from interface:ChunkHasher
Hash a boxed object.- Specified by:
hashInitial
in interfaceChunkHasher
- Parameters:
value
- the boxed object to hash- Returns:
- the hashcode, as if you called the chunked version of this function
-
hashUpdate
Description copied from interface:ChunkHasher
Update a hash for a boxed object.- Specified by:
hashUpdate
in interfaceChunkHasher
- Parameters:
existing
- the existing hashcodevalue
- the boxed object to add to the hash code- Returns:
- the hashcode, as if you called the chunked version of this function
-
hashInitial
public void hashInitial(Chunk<Attributes.Values> values, WritableIntChunk<Attributes.HashCode> destination)Description copied from interface:ChunkHasher
Called for the first (or only) hash value, sets the hash codes in destination corresponding to values.- Specified by:
hashInitial
in interfaceChunkHasher
- Parameters:
values
- the values to hashdestination
- the chunk to write hash values into
-
hashUpdate
public void hashUpdate(Chunk<Attributes.Values> values, WritableIntChunk<Attributes.HashCode> destination)Description copied from interface:ChunkHasher
Called for subsequent hash values, updates the hash codes in destination corresponding to values.- Specified by:
hashUpdate
in interfaceChunkHasher
- Parameters:
values
- the values to hashdestination
- the chunk to update hash values into
-