-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 149: Implement off-heap cache storage #151
Conversation
I am not really sure that using ByteBufInputStream can be faster that deserializing to a byte[] and then reading data from a ByteArrayInputStream, because ByteBufInputStream will perform a lot of Unsafe operations instead of a single copy from Direct to Heap, only benchmarks will give the answer |
Fixes #149 |
import java.lang.ref.SoftReference; | ||
import java.util.Arrays; | ||
import java.util.logging.Level; | ||
import java.util.logging.Logger; | ||
|
||
/** | ||
* Una entry nella cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment in italian. Not important
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 it looks ok
Use Netty Direct ByteBufs to store data.
Introduce refcounting of CacheEntry objects in order to be able to release direct memory