Terracotta-OSS / offheap-store

A library that provides a set of map and cache implementations that store data outside of the normal Java heap
Apache License 2.0
90 stars 46 forks source link

Add ability for OffheapStorageArea to always copy #39

Closed cschanck closed 8 years ago

cschanck commented 8 years ago

In some cases, you read a buffer via OHSA.readBuffer(), and you always know you need a copy. Unfortunately, you can't always tell; subject to buffer length and page size and location, you may or may not get a copy.

Here we add a 3 arg readbuffer() call which allows the user to specific that they want a copy.

lorban commented 8 years ago

A little test would be welcome.

chrisdennis commented 8 years ago

Going to be replaced with a different proposal.