Class TokenMapFileSharedBuffers
java.lang.Object
io.nosqlbench.datamappers.functions.rainbow.TokenMapFileSharedBuffers
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBuffergetByteBuffer(String filename, boolean instanced, boolean ascending) Find and load theByteBufferwhich can be read at the specified location.
-
Field Details
-
INSTANCE
-
-
Method Details
-
getByteBuffer
Find and load theByteBufferwhich can be read at the specified location. This will only be loaded into memory once. All callers will get access to the same logical source data. Whether or not the caller gets its own buffer tracking state (seeBuffer). If each caller will use the Buffer API for incremental reads, where callers could possibly read the same records, then separate instanced buffers are advised.However, if you are planning to use position-oriented access to the buffer only, then it is not necessary to ask for instanced buffers. In some usage patterns, it may be desirable to provide a single logical view of buffer reader position across multiple threads. In this case, setting instanced to false is necessary.
- Parameters:
filename- The location of the source data for the buffer.instanced- If true, each caller gets a wrapped buffer object with its own tracking stateascending-- Returns:
- An instance of a ByteBuffer
-