com.emc.mongoose.base.data.SeedDataInput Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mongoose-base Show documentation
Show all versions of mongoose-base Show documentation
Mongoose is a high-load storage performance testing tool
package com.emc.mongoose.base.data;
import static com.emc.mongoose.base.data.DataInput.generateData;
import static java.nio.ByteBuffer.allocate;
import static java.nio.ByteBuffer.allocateDirect;
/**
Created by kurila on 23.07.14. A uniform data input for producing uniform data items. Implemented
as finite buffer of pseudo random bytes.
*/
public final class SeedDataInput
extends CachedDataInput {
public SeedDataInput() {
super();
}
public SeedDataInput(final long seed, final int size, final int cacheLimit, final boolean isInHeapMem) {
super(isInHeapMem ? allocate(size) : allocateDirect(size), cacheLimit, isInHeapMem);
generateData(inputBuff, seed);
}
public SeedDataInput(final SeedDataInput other) {
super(other);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy