<div dir="ltr"><div><div><div><div><div><div><div><div>I have been working on adding in off heap support for a given cache.  I wanted to check in and let you all know what I was thinking for the configuration and changes that would come about with it.<br><br></div><div>TLDR;<br></div><div>New config under data container to enable off heap, StoreAsBinary removed, Equivalence removed</div><div><br></div>First I was planning on adding new sub elements of data container.  These would be instance, binary and off-heap.  Only of the three could be picked as they are mutually exclusive.  Instance is as we operate now where we store the instance of the object passed to us.  Binary is essentially what we have now that is called storeAsBinary with both keys and values converted.  Lastly off-heap would store the entry as a byte[] store completely in native memory.<br><br></div>Example:<br><br></div> &lt;data-container&gt;<br></div>   &lt;off-heap/&gt;<br></div>  &lt;/data-container&gt;<br><br></div>The reason it is a subelement instead of a property is because off-heap will most likely require some additional configuration to tell how many entries to store in the a bucket (think non resizing HashMap).<br><br></div>With these changes storeAsBinary becomes redundant, so I was planning on removing this configuration completely.  I would rather remove since this is 9.0 and not deprecate.  As far as I know nobody really used it before.<br><br></div><div>Also another side effect is I was removing all of the Equivalence classes.  I am not sure if I can plainly remove them since they have lived in commons for quite a while, but it would be best if I could, although I am fine deprecating.  In its place the instance setting for data-container will always wrap byte[] to satisfy equals and hashCode methods.<br></div><div><br></div><div>Any feedback would be appreciated.<br></div><div><br></div><div>Thanks,<br></div> - Will<br></div>