mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
actually add new functions to build
This commit is contained in:
parent
5b1ffee89a
commit
a64ca6beee
@ -18,7 +18,7 @@ import java.util.function.LongToIntFunction;
|
|||||||
*
|
*
|
||||||
* As a 'Hashed' function, the input value is hashed again before being used as value.
|
* As a 'Hashed' function, the input value is hashed again before being used as value.
|
||||||
*/
|
*/
|
||||||
@Categories(Category.conversion)
|
@Categories({Category.conversion,Category.general})
|
||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
public class ByteBufferSizedHashed implements LongFunction<ByteBuffer> {
|
public class ByteBufferSizedHashed implements LongFunction<ByteBuffer> {
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package io.nosqlbench.virtdata.library.basics.shared.from_long.to_bytebuffer;
|
package io.nosqlbench.virtdata.library.basics.shared.from_long.to_bytebuffer;
|
||||||
|
|
||||||
|
import io.nosqlbench.virtdata.api.annotations.Categories;
|
||||||
|
import io.nosqlbench.virtdata.api.annotations.Category;
|
||||||
import io.nosqlbench.virtdata.api.annotations.ThreadSafeMapper;
|
import io.nosqlbench.virtdata.api.annotations.ThreadSafeMapper;
|
||||||
import org.apache.commons.codec.binary.Hex;
|
import org.apache.commons.codec.binary.Hex;
|
||||||
|
|
||||||
@ -10,6 +12,7 @@ import java.util.function.Function;
|
|||||||
* Convert the contents of the input ByteBuffer to a String as hexadecimal.
|
* Convert the contents of the input ByteBuffer to a String as hexadecimal.
|
||||||
*/
|
*/
|
||||||
@ThreadSafeMapper
|
@ThreadSafeMapper
|
||||||
|
@Categories(Category.conversion)
|
||||||
public class ByteBufferToHex implements Function<ByteBuffer,String> {
|
public class ByteBufferToHex implements Function<ByteBuffer,String> {
|
||||||
@Override
|
@Override
|
||||||
public String apply(ByteBuffer byteBuffer) {
|
public String apply(ByteBuffer byteBuffer) {
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package io.nosqlbench.virtdata.library.basics.shared.from_long.to_bytebuffer;
|
package io.nosqlbench.virtdata.library.basics.shared.from_long.to_bytebuffer;
|
||||||
|
|
||||||
|
import io.nosqlbench.virtdata.api.annotations.Categories;
|
||||||
|
import io.nosqlbench.virtdata.api.annotations.Category;
|
||||||
|
import io.nosqlbench.virtdata.api.annotations.ThreadSafeMapper;
|
||||||
import io.nosqlbench.virtdata.api.bindings.VirtDataConversions;
|
import io.nosqlbench.virtdata.api.bindings.VirtDataConversions;
|
||||||
import io.nosqlbench.virtdata.library.basics.shared.from_long.to_int.Hash;
|
import io.nosqlbench.virtdata.library.basics.shared.from_long.to_int.Hash;
|
||||||
|
|
||||||
@ -18,6 +21,8 @@ import java.util.function.LongToIntFunction;
|
|||||||
* This function behaves slightly differently than most in that it creates and
|
* This function behaves slightly differently than most in that it creates and
|
||||||
* caches as source byte buffer during initialization.
|
* caches as source byte buffer during initialization.
|
||||||
*/
|
*/
|
||||||
|
@ThreadSafeMapper
|
||||||
|
@Categories(Category.general)
|
||||||
public class HashedByteBufferExtract implements LongFunction<ByteBuffer> {
|
public class HashedByteBufferExtract implements LongFunction<ByteBuffer> {
|
||||||
|
|
||||||
private final LongToIntFunction sizefunc;
|
private final LongToIntFunction sizefunc;
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
package io.nosqlbench.virtdata.library.basics.shared.from_long.to_bytebuffer;
|
package io.nosqlbench.virtdata.library.basics.shared.from_long.to_bytebuffer;
|
||||||
|
|
||||||
|
import io.nosqlbench.virtdata.api.annotations.Categories;
|
||||||
|
import io.nosqlbench.virtdata.api.annotations.Category;
|
||||||
|
import io.nosqlbench.virtdata.api.annotations.ThreadSafeMapper;
|
||||||
import io.nosqlbench.virtdata.api.bindings.VirtDataConversions;
|
import io.nosqlbench.virtdata.api.bindings.VirtDataConversions;
|
||||||
import io.nosqlbench.virtdata.library.basics.shared.from_long.to_int.Hash;
|
import io.nosqlbench.virtdata.library.basics.shared.from_long.to_int.Hash;
|
||||||
import org.apache.commons.codec.binary.Hex;
|
import org.apache.commons.codec.binary.Hex;
|
||||||
@ -21,6 +24,8 @@ import java.util.function.LongToIntFunction;
|
|||||||
* This function behaves slightly differently than most in that it creates and
|
* This function behaves slightly differently than most in that it creates and
|
||||||
* caches as source byte buffer during initialization.
|
* caches as source byte buffer during initialization.
|
||||||
*/
|
*/
|
||||||
|
@ThreadSafeMapper
|
||||||
|
@Categories({Category.general})
|
||||||
public class HashedCharBufferExtract implements LongFunction<CharBuffer> {
|
public class HashedCharBufferExtract implements LongFunction<CharBuffer> {
|
||||||
|
|
||||||
private final LongToIntFunction sizefunc;
|
private final LongToIntFunction sizefunc;
|
||||||
|
Loading…
Reference in New Issue
Block a user