Class HashedFileExtractToString
java.lang.Object
io.nosqlbench.virtdata.library.basics.shared.from_long.to_string.HashedFileExtractToString
- All Implemented Interfaces:
LongFunction<String>
Pseudo-randomly extract a section of a text file and return it according to some
minimum and maximum extract size. The file is loaded into memory as a shared
text image. It is then indexed into as a character buffer to find a pseudo-randomly
sized fragment.
-
Constructor Summary
ConstructorsConstructorDescriptionHashedFileExtractToString(String filename, int minsize, int maxsize) HashedFileExtractToString(String filename, Object sizefunc) Provide a size function for the fragment to be extracted. -
Method Summary
-
Constructor Details
-
HashedFileExtractToString
-
HashedFileExtractToString
Provide a size function for the fragment to be extracted. In this form, if the size function specifies a string size which is larger than the text image, it is truncated via modulo to fall within the text image size.- Parameters:
filename- The file name to be loadedsizefunc- A function which determines the size of the data to be loaded.
-
-
Method Details
-
apply
- Specified by:
applyin interfaceLongFunction<String>
-
toString
-