public class FSTByteBufferOffheap
extends Object
Core offheap implementation. The offheap is initialized with a fixed size. Multi threaded access is granted using
createAccess(). Concurrent read operations perform ok'ish (low blocked time), concurrent write is possible but threads probably will be blocked
often.
Objects added to the heap have to implement Serializable.
Use this as a base for higher level collection implementation. In order to get dynamically growing offheaps, consider
writing a collection wrapper managing ~1GB slices of FSTByteBufferOffheap objects.
Each object can be stored with a 'tag'. When iterating the off heap, it is possible to only read the Tag Object to improve
performance. E.g. if you write a lot of bloaty 'Person' objects, you'd like to add {name, firstname} as a tag so you can search
the offheap without the need to completely deserialize every object. In general iterating this for search should be replaced by
some kind indexing at a higher level if the amount of data is huge.
Searching using iteration (Tag's only) processes ~500.000 objects per second (core I7 3 Ghz).
You can provide your own Buffer object in order to use this on a memory mapped file.
Note there is no 'overwrite' operation. You only can add objects, so there is the need to 'reorganize' a heap buffer from
time to time.